On Fri, Mar 20, 2020 at 03:37:08PM +1100, Chris Angelico wrote:

> "Subject to breakage without warning" technically applies to a *lot*
> of things that aren't guaranteed.

Yes?


> Using __pretty__ as a protocol is no different from any of those.

If we should choose to use a `__pretty__` dunder, we have no obligation 
to follow Samuel's API, or make it a future-import, or give him any 
warning, or make any allowances for the fact that he is already using 
it. We can just break his code.

Samuel may not have known that, but hopefully he will now.


> IMO it's not exactly a serious crime,

Isn't it? Damn, I've already reported him to the federal police, the 
SWAT team will be arriving in 5, 4, 3, 2, ...

*wink*

I didn't describe it as a crime at all, I just asked if he knew he was 
using a reserved name.


> even if technically it's
> something that could be broken. Also, since this is a proposal on
> python-ideas, it'd have as much blessing as __copy__, which to my
> knowledge has no meaning in the language itself, only in the standard
> library; it'd be the same with __pretty__, defined by the pprint
> module.

I don't think that's a distinction that means anything. Whether the 
standard library or the interpreter itself breaks your code, it's still 
broken.



-- 
Steven
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/XL5FU5PLXQLYBPPXF6LB7ANYZVSU3JNY/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to