Что нового добавили в REPL в Python 3.13
На самом деле серьезно его прокачали!
▫️Както я писал, что для выхода из REPL приходится писать exit, еще и скобки для вызова. И было бы удобней сделать это по аналогии с обычным терминалом.
Видимо, я не один такой😁 В новом REPL добавили несколько команд:
exit или quit: для выхода. Именно так, без вызова функции!
clear: для очистки терминала
help или F1: для входа в режим справки (q для выхода)
▫️ Автокомплит по TAB аналогичный Linux-терминалу. Одиночный TAB заполняет самое пхожее совпадение, двойной показывает все доступные варианты. Эти варианты фильтруются по мере набора.
▫️ Ранее при вставке многострочного кода с пустыми строками мы получали ошибку IndentationError, теперь это исправили.
Хотя, в некоторых терминалах это даже с 3.6 работает нормально, но зависит от конкретной реализации именно терминала а не Python. На винде точно не работает до 3.13.
Пример кода для теста в 3.12 и 3.13
class A:
def test(self):
pass
▫️ История ввода теперь учитывает многосрочные команды.При нажатии стрелки вверх появятся все строки из прошлого многосрочного ввода, по ним даже можно перемещаться и редактировать.
По нажатию F2 можно открыть всю историю ввода.
▫️ Колоризация кода для tracebacks и doctest. Также я заметил что имеет цвет промт функции input().
Кстати, для тестов на винде без установки можно использовать портейбл версию из проектаWinPython.
#release
#SriLanka
Il presidente dell'assemblea nazionale Imaduwa Pradeshiya è morto durante le proteste per un infarto, dopo che dei manifestanti hanno dato alle fiamme la sua abitazione. Nello stesso giorno, è stato appiccato un incendio anche nella casa dell'ex primo ministro.
@UltimoraPolitics
🇱🇰Sri Lanka Raises Cooking Gas Prices 23%
Sri Lanka raised liquefied petroleum gas prices on April 6, citing higher global prices driven by the Iran war. State-owned Litro Gas, the main domestic LPG supplier, increased the price of a 12.5kg refill from 3,990 rupees to 4,765 rupees, a rise of 19.42 per cent.
A private supplier holding roughly a quarter of the domestic market raised its retail price by 23 per cent to 5,700 rupees. A Litro spokesperson attributed the revision to higher global LPG prices and increased shipping costs, and confirmed supplies sufficient for the entire month of April.
The April increase follows an eight per cent hike in March, when Sri Lanka also raised fuel and electricity prices by more than a third. Sri Lanka's government has previously stated that a prolonged conflict in the Middle East could undermine the country's recovery from its 2022 economic crisis, noting that the Strait of Hormuz has been effectively closed since the conflict began.
#SriLanka
@asianomics
🇱🇰Sri Lanka Battles Energy Crisis, Economic Strain
Sri Lanka's government has rationed fuel, raised fuel prices by a third, and increased electricity costs by up to 40 per cent since the Middle East war began disrupting global energy supplies. The measures compound the economic damage from Cyclone Ditwah, which killed 641 people and caused an estimated US$4.1 billion in damage late in 2025.
President Anura Kumara Dissanayake's administration is also managing review conditions tied to a US$2.9 billion IMF bailout loan, with a US$700 million instalment pending. Sri Lankan authorities have indicated they may request modifications to the loan's austerity conditions given the deteriorating external environment.
The Frontline Socialist Party, which led the 2022 protests that removed former president Gotabaya Rajapaksa, has warned that the current administration may face a similar political implosion. Human rights lawyer Bhavani Fonseka noted that emergency laws, introduced after Cyclone Ditwah, give authorities broad powers to arrest and detain, which could limit public protest activity.
#SriLanka
@asianomics
🗺Sri Lanka 🇱🇰
The Red Mosque (Jami Ul-Alfar Masjid) in Sri Lanka is a towering structure in the heart of Colombo's commercial district, Pettah.
Each brick of the building is painted red and white, featuring Indo-Saracenic architecture with pomegranate-shaped domes.
Today, it is the largest mosque in Sri Lanka, accommodating up to 10,000 worshippers.
#SriLanka
@voyage
🇱🇰#SriLankaОбразуются длинные очереди для посещения резиденции президента, занятой в течение трех дней демонстрантами ⚠️☝️
💬Даже в условиях революции и госпереворота люди культурно стоят в очереди, уважая друг друга!
🇱🇰#SriLankaПротестующие на Шри-Ланке нашли миллионы рупий в захваченной резиденции президента страны ⚠️☝️
💬Все деньги передали в службу безопасности для восстановления страны.
🇱🇰#SriLankaПротестующие Шри-Ланки обживаются в президентском особняке ⚠️☝️
💬Второй день они купаются в президентском бассейне и занимаются в его фитнес-центре, а так же устраивают пир в его столовой!
💬 Сам президент успел сбежать до штурма дворца. Он покинул Шри-Ланку на частном самолёте.
🇱🇰#SriLankaПротестующий народ Шри-Ланки ворвался в резиденцию президента ⚠️☝️
💬 Президент Шри-Ланки успел сбежать до того, как туда прорвались бунтующие граждане.
💬 Страна уже несколько месяцев живет совершенно без топлива, испытывает проблемы с электроэнергией и продовольствием.
🇱🇰#SriLankaПротестующий народ Шри-Ланки ворвался в резиденцию президента ⚠️☝️
💬 Президент Шри-Ланки успел сбежать до того, как туда прорвались бунтующие граждане.
💬 Страна уже несколько месяцев живет совершенно без топлива, испытывает проблемы с электроэнергией и продовольствием.
Protests continue in Sri Lanka, despite the imposition of a state of emergency. People are demanding the resignation of President Gotabaya Rajapaksa.
Anti-Russian sanctions have exacerbated the economic crisis, and prices in the country have skyrocketed. The cost of basic foodstuffs has more than doubled. Locals queue up for paraffin. They need fuel to cook food.
The ‘hottest’ point of the protests is near the secretariat of the head of state. A tent camp was set up there. People have travelled from all over the country. Among the protesters is Mahindi Siri, a 40-year-old Special Forces soldier. He lost a leg after being blown up by a landmine while fighting in the north. The war ended 13 years ago. He never imagined he would have to count every rupee to survive.
This footage was shot by an RT Documentary team in Sri Lanka, making a new film about how the country is coping with the economic crisis. It’s premiering soon.
#video#SriLanka
Follow: https://t.me/rtdocumentary