On Sat, Mar 20, 2021 at 04:34:02AM -0400, Alan Bawden wrote:
> The real reason Python strings support a .title() method is surely
> because Unicode supports upper, lower, _and_ title case letters, and
> tells you how to map between them. Consider:
>
>>>> '\u01f1'.upper()
>'\u01f1'
>
> Th
Greetings,
This snippet of code raises ValueError during execution:
class MyClass:
__slots__ = 'foo'
foo: int = 0
mypy does not complain:
mypy myclass.py
Success: no issues found in 1 source file
But python3 does:
python3 myclass.py
Traceback (most recent call last):
File "myclass.p
Dear all,
I would like to learn about constant folding optimisation in Python. It seems
to be implemented in Python/ast_opt.c. In order to get impression I used
python3 and dis module:
$ python3 -V
Python 3.7.3
Arithmetics expression is folded as expected:
>>> dis.dis(compile('1 * 2', filename=
On Fri, Nov 13, 2020 at 05:12:10PM +, ChalaoAdda wrote:
> On Fri, 13 Nov 2020 12:04:53 -0500, Richard Damon wrote:
>
> > On 11/13/20 11:42 AM, ChalaoAdda wrote:
> >> On Fri, 13 Nov 2020 16:04:03 +, Stefan Ram wrote:
> >>
> >>> ChalaoAdda writes:
> On Fri, 13 Nov 2020 15:41:20 +,
I find a parallel to counting useful. Let letters be '0' to '9'
and think of manual (in contrast to formatting range(0, 10))
construction of list of strings "" to ""
Let's start with . How do you compute the next item? Start
looking from its end. I stop here in order to leave space fo