On Wed, 27 Apr 2022 at 11:18, Greg Ewing <greg.ew...@canterbury.ac.nz> wrote:
>
> On 27/04/22 2:01 am, Chris Angelico wrote:
> > That would be the case if monkeypatching were illegal. Since it's not,
> > wherein lies the difference?
>
> 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.
It doesn't make sense to compare them. The proposed feature is an
alternative way to add attributes to an existing class object, which
we normally call monkeypatching, but you're saying that sometimes it
isn't. I'm still confused as to why you consider there to be a
difference.

According to this proposal, it is entirely possible to continue a
class more than once, with just some fiddling with dunders. 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. I say that
it's always monkeypatching, and always a good thing.

ChrisA
_______________________________________________
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/5UYWIKP5PUHDRAE6APVHMBWIAVQYZTH3/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to