Re: Is this a "gotcha" in Python?

2019-04-20 Thread Chris Angelico
On Sun, Apr 21, 2019 at 8:43 AM DL Neil wrote: > > Be aware that this is using an old form of Python syntax, not > > supported by current versions. To try this example in a modern version > > of Python, write it like this: > > > > for l in range(50): > > print(l, end=" ") > > > Python2: print

Re: Is this a "gotcha" in Python?

2019-04-20 Thread DL Neil
On 21/04/19 8:16 AM, Chris Angelico wrote: On Sun, Apr 21, 2019 at 2:14 AM Dennis Lee Bieber wrote: Only use short (single character) names for items that only exist as loop control, and are not rebound within the loop, nor used outside of the scope of that loop (but can be reused in a

Re: Is this a "gotcha" in Python?

2019-04-20 Thread Chris Angelico
On Sun, Apr 21, 2019 at 2:14 AM Dennis Lee Bieber wrote: > Only use short (single character) names for items that only exist as > loop control, and are not rebound within the loop, nor used outside of the > scope of that loop (but can be reused in another subsequent loop > control)... > >

Re: Is this a "gotcha" in Python?

2019-04-20 Thread Jon Ribbens
On 2019-04-19, Stefan Ram wrote: > Now consider the same in Python: > > def f(): > # ... > l = 22 # representing a length > # ... > l = 'abc'; # representing the left half of something > # ... > > A Python implementation does not catch the "error". Obviously it is a deli

Re: unicode mail list archeology

2019-04-20 Thread Luuk
On 20-4-2019 12:47, Luuk wrote: On 20-4-2019 11:26, wxjmfa...@gmail.com wrote: http://unicode.org/mail-arch/unicode-ml/Archives-Old/UML018/0594.html [quoot] > It is simple to make a compacter version of UTF-8 using the base > 256 character codes were possible (comacter for many languages).

Re: unicode mail list archeology

2019-04-20 Thread Luuk
On 20-4-2019 11:26, wxjmfa...@gmail.com wrote: http://unicode.org/mail-arch/unicode-ml/Archives-Old/UML018/0594.html [quoot] > It is simple to make a compacter version of UTF-8 using the base > 256 character codes were possible (comacter for many languages). No. If you think otherwise, you ha

Re: Is this a "gotcha" in Python?

2019-04-20 Thread Ben Bacarisse
Gilmeh Serda writes: > On Fri, 19 Apr 2019 21:01:05 +, Stefan Ram wrote: > >> Has this ever been a problem for someone? > > Only for programmers who come here from other languages and expect Python > to behave in the same manner as their favorite language, so they try and > argue that thi

Re:

2019-04-20 Thread Mark Kettner
On 19 Apr 2019 at 16:37, Tamara Berger wrote: > What code can I use to break out of a program completely, and not just out > of a loop? exit(1) ... but this exits the python interpreter. inside a function, a return statement might be more suitable. > I wrote code with 3 conditions for saving