On 4/22/2022 9:13 PM, Larry Hastings wrote:

     forward class X()

New keywords are a nuisance. And the proposed implementation seems too complex. How about a 'regular' class statement with a special marker of some sort.
Example: 'body=None'.

Either __new__ or __init__ could raise XError("Cannot instantiate until this is continued.", so no special instantiation code would needed and X could be a real class, with a special limitation.

     continue class X:
         # class body goes here
         def __init__(self, key):
             self.key = key

'continue' is already a keyword. Given that X is a real class, could implementation be
X.__dict__.update(new-body-dict)


--
Terry Jan Reedy
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/UAZ5P7N5S4OWFSVZSKK6DUEPZTQPV3GP/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to