Steven D'Aprano wrote:
> Yes, really.
>
>
https://docs.python.org/3/reference/lexical_analysis.html#reserved-classes-of-identifiers

I remembered the existence of this rule and tried to locate it recently
(prior to this discussion), but was unable to because it doesn't explicitly
mention "dunder". IMO, it would make that section much easier to find if it
were to say either of:

1) System-defined names, also known as "dunder" names.
2) System-defined names, informally known as "dunder" names.
3) System-defined "dunder" names.

Instead of the current:

System-defined names.

(or any mention of "dunder" for that matter)

It would be much easier to locate. Realistically speaking, I can't imagine
that the majority of Python users and library maintainers would read
through the entire "Lexical Analysis" page of the docs if they're not
specifically interested in parsing or something similar. :-)

Regardless though, thanks for providing the link. I'll try to remember its
location for future reference.


On Fri, Mar 20, 2020 at 12:29 AM Steven D'Aprano <st...@pearwood.info>
wrote:

> On Fri, Mar 20, 2020 at 03:01:16PM +1100, Chris Angelico wrote:
> > On Fri, Mar 20, 2020 at 2:59 PM Steven D'Aprano <st...@pearwood.info>
> wrote:
> > >
> > > On Thu, Mar 19, 2020 at 11:38:28PM +0000, Samuel Colvin wrote:
> > >
> > > > But it also looks for a "__pretty__" method on objects, and if found
> uses
> > > > that to display the object.
> > >
> > > Are you aware that dunder names are reserved for Python's use?
> > >
> >
> > Really?
>
> Yes, really.
>
>
> https://docs.python.org/3/reference/lexical_analysis.html#reserved-classes-of-identifiers
>
>
> > Somebody better tell SQLAlchemy that they're breaking rules, then.
>
> Lots of people break the rules all the time. Doesn't mean they should.
>
>
>
>
> --
> 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/EE63SP2N6DKZ3ISY3UFAC6HMBGAKPZCA/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
_______________________________________________
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/W7QI6WG5Z2FIFT4K34MQOBNLAUODW3KK/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to