On 27/04/22 1:26 pm, Chris Angelico wrote:
On Wed, 27 Apr 2022 at 11:18, Greg Ewing <greg.ew...@canterbury.ac.nz> wrote:
The proposed feature is analogous to forward declaring a
struct in C. Would you call what C does monkeypatching?
No, because C doesn't have first-class types, much less mutable ones.
The purpose of a forward declaration, in any language, is to
allow a name to be used before it's fully defined. Mutability
or first-classness of types has nothing to do with it.
According to this proposal, it is entirely possible to continue a
class more than once, with just some fiddling with dunders.
No, it's not. As has been explained upthread, stuff is done
when finalising a class that can't be repeated.
But what
you're saying is that sometimes that's monkeypatching and a bad thing,
and other times it's a good thing and not monkeypatching.
No, I'm saying that the proposed feature is not monkeypatching
because it does not and cannot be used to modify an existing
class.
--
Greg
_______________________________________________
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/SVZPAEBDIGHR2TADKCOXND4S3RPKXAMY/
Code of Conduct: http://python.org/psf/codeofconduct/