Às 01:14 de 30/10/22, Thomas Passin escreveu:
On 10/29/2022 1:45 PM, Paulo da Silva wrote:
Hi!
Consider this simple script ...
___
from typing import List, Optional
class GLOBALS:
foos=None
class Foo:
def __init__(self):
pass
class Foos:
Foos: List[F
On 2022-10-29 20:14:12 -0400, Thomas Passin wrote:
> I don't understand
>
> class Foos:
> Foos: List[Foo]=[]
>
> If "Foos" is supposed to be a class attribute, then it cannot have the same
> name as the class.
Why not? They are in different namespaces.
#v+
#!/usr/bin/python3
class Foos:
On 10/29/2022 1:45 PM, Paulo da Silva wrote:
Hi!
Consider this simple script ...
___
from typing import List, Optional
class GLOBALS:
foos=None
class Foo:
def __init__(self):
pass
class Foos:
Foos: List[Foo]=[]
# SOME GLOBALS ARE USED HERE in a r