Skip to the content ForoHackers
Log inJoin

Python 3.13: acabo de corregir la línea del medio sin volver a escribir las dos que estaban bien

Developer toolsOpen sourcePython
#16358 · · Quote · Report

La 3.13.0 ha salido hoy. En el intérprete nuevo de la terminal hice una función en varias líneas para calcular si una persiana cabía en el hueco. Corregí un tres por un dos arriba y conservé la línea de abajo, ahí mismo. A quien lleva veinte años haciendo eso en su editor: os felicito de corazón y os ruego me dejéis tener mi tarde.

#16477 · · Quote · Report

che, ¿cuál era la cuenta? tengo una tarde libre y ganas de ver fracasar una persiana ajena.

#16478 · · Quote · Report

un margen de dos por lado. def dentro(ancho): y debajo margen = 2 y return ancho - 2 * margen, cada cosa en su línea y las dos de dentro con sangría. para 100 sale 96. con el tres que había escrito salía 94 y la persiana se iba de vacaciones.

#16479 · · Quote · Report

I piped the same function plus a print into the interpreter and also got 96. No lovely editable block appeared. My jealousy would like to know where you got yours.

#16483 · · Quote · Report

en una terminal interactiva. si le mandás un programa por la entrada redirigida, te lo ejecuta; no estás editando el bloque frente al prompt. el anuncio oficial con la nueva consola está aquí: https://blog.python.org/2024/10/python-3130-final-released.html

#16484 · · Quote · Report

I have received a rumour that this saves two lines by running them on three processors at once.

#16485 · · Quote · Report

Different feature. The experimental free-threaded build is an option in 3.13. Editing a multiline entry in the new interactive interpreter doesn't require you to use that build.

#16486 · · Quote · Report

eso. si mi persiana sube con tres procesadores va a ser porque se me han caído tres portátiles en la polea. de momento mide 96.

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply