[Python-Dev] Re: Proto-PEP part 1: Forward declaration of classes

2022-04-24 Thread Joao S. O. Bueno
I guess Carl's messages put an end to this proposal as it is. >From "the language side", I can think of nothing short of actually transforming _in place_ (like it is possible with instances of ordinary classes when you assign then a new "__class__") the "forward referenced object" into the

[Python-Dev] Re: What is Modules/rotatingtree.c for?

2022-04-24 Thread Gregory P. Smith
On Sun, Apr 24, 2022 at 9:24 AM Patrick Reader <_...@pxeger.com> wrote: > I've just noticed Modules/rotatingtree.{h,c}, which don't seem to be > used anywhere. Are they just dead code? If so, is there a reason they > haven't been removed? > grep -R rotatingtree ; grep -R _lsprof rotatingtree is

[Python-Dev] Re: Proto-PEP part 1: Forward declaration of classes

2022-04-24 Thread Carl Meyer via Python-Dev
On Sun, Apr 24, 2022 at 10:20 AM Joao S. O. Bueno wrote: > > I am not worried about the bikeshed part of which syntax to use - > and more worried with the possible breaking of a lot of stuff, unless > we work with creation of a non-identical "forward object" that is > rebound, as in plain name

[Python-Dev] What is Modules/rotatingtree.c for?

2022-04-24 Thread Patrick Reader
I've just noticed Modules/rotatingtree.{h,c}, which don't seem to be used anywhere. Are they just dead code? If so, is there a reason they haven't been removed? ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to

[Python-Dev] Re: Proto-PEP part 1: Forward declaration of classes

2022-04-24 Thread Joao S. O. Bueno
I am not worried about the bikeshed part of which syntax to use - and more worried with the possible breaking of a lot of stuff, unless we work with creation of a non-identical "forward object" that is rebound, as in plain name binding, when the second part is declared. I've stated that amidst my

[Python-Dev] Re: Proto-PEP part 1: Forward declaration of classes

2022-04-24 Thread Carl Meyer via Python-Dev
Hi Larry, On Sat, Apr 23, 2022 at 1:53 AM Larry Hastings wrote: > But rather than speculate further, perhaps someone who works on one of the > static type analysis checkers will join the discussion and render an informed > opinion about how easy or hard it would be to support "forward class"

[Python-Dev] Re: Proto-PEP part 1: Forward declaration of classes

2022-04-24 Thread Eric V. Smith
On 4/24/2022 5:42 AM, Stephen J. Turnbull wrote: What's the use case for arbitrary expressions vs. a (possibly qualified) name? A class factory that produces forward declarations? Do you have a use case in mind? It's: x.py: --8< forward class A() --8< x_impl.py

[Python-Dev] Re: Proto-PEP part 1: Forward declaration of classes

2022-04-24 Thread Stephen J. Turnbull
Larry Hastings writes: > On 4/22/22 19:36, Terry Reedy wrote: > > How about a 'regular' class statement with a special marker of some > > sort.  Example: 'body=None'. > > It's plausible.  I take it "body=None" would mean the declaration would > not be permitted to have a colon and a