Что нового добавили в 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
I sprayed her butt just a little with hand sanitizer because she keeps on biting wires on the desk.. I swear just a little 🥺 & she slowly sit there, lying down, with her eyes looking at me for a while until slowly falls asleep 🥺 she stopped biting the wires but I feel bad 🥺 Is she sad? or just tired? 🥺
#random#Henoa
@quietworld🍃
Today, a thought strucked me;
I love looking at cats especially high breed cat but I never wanted to buy and take care of high breed cat because I'm scared that I'm not able to take good care of it since high breed requires high maintenance.. So, I only wanted to take care of village cat, but then, I treat the village cat like high breed cat 😂
So.. why was I scared to adopt/buy high breed cat, right? I treat my village cat like royal anyway 😂
* currently waiting for my kitten to come back from home-based grooming service (waiting anxiously) *
I hope she comes back here safe 🥺😢
#thoughts#cat#Henoa
@quietworld🍃
Yeyy she's finally back from grooming 😍 Her nails clipped, ears cleaned and she smells good ☺❤ I'll get no more scars because her habit of climbing me 🤣 for now.. until her nails grow long and sharp again 🤣
Worth the wait..
from 12:30PM until 03:40PM🥰
#cat#Henoa#chupdate
@quietworld🍃
Shopping for Henoa le Kitten again! 😍
Unplanned but I found item that I didn't know exist before that I think Henoa & I needs and I read lots of reviews saying that this shop sells a lot cheaper than other stores so why not? 😂
Will be making a video of unboxing these + review once they arrived and tested 🥰💞
Stay tuned for this video upload in my channel 🥰
#marcegetaway#youtube#kitten#Henoa
@quietworld🍃
New video uploaded! 😍
p/s: not the video I mentioned in my sneak peek post recently, that is still in the making😉
#adoptingastraykittenjourney#adoptdontshop#Henoa#kitten#youtube#chupdate
@quietworld🌻
New video uploaded! 😍
p/s: not the video I mentioned in my sneak peek post recently, that is still in the making😉
#shopee#haul#Henoa#kitten#youtube#chupdate
@quietworld🌻