Operator: inappropriate wording?

2022-10-26 Thread elas tica
Quotes from The Python Language Reference, Release 3.10.8: - Note that tuples are not formed by the parentheses, but rather by use of the comma operator (p. 66) - Note: If the object is a class instance and the attribute reference occurs on both sides of the assignment operator (p. 86) - The sec

Re: Operator: inappropriate wording?

2022-10-31 Thread elas tica
Le mercredi 26 octobre 2022 à 22:12:59 UTC+2, Weatherby,Gerard a ecrit : > No. If the docs say in one place a comma is not an operator, they shouldn’t > call it an operator in another place. > > I’ve submitted a pull request https://github.com/python/cpython/pull/98736 -- > we’ll have to see wh

Re: Operator: inappropriate wording?

2022-11-02 Thread elas tica
Le lundi 31 octobre 2022 à 22:18:57 UTC+1, Chris Angelico a ecrit : > Wording is hard. Just ask the SQL standard whether NULL is a value. > Indeed, but I think our problem here is simpler ;) One could for example omit the incorrect term "operator" while remaining unambiguous. This would give:

Re: Operator: inappropriate wording?

2022-11-04 Thread elas tica
Le vendredi 4 novembre 2022 à 16:29:34 UTC+1, Chris Angelico a écrit : > Yep. The word "operator" is incorrect when referring to Python's comma > (in contrast to, say, C, where the comma actually *is* an operator); > and from my understanding, the docs have already been updated to fix > this.

Not found in the documentation

2021-04-26 Thread elas tica
Python documentation doesn't seem to mention anywhere what is the str value of an int: is it right? the same for float, Fraction, complex, etc? Not worth to be documented? Perphaps str(42) returns "forty two" or "XLII" or "101010" ... -- https://mail.python.org/mailman/listinfo/python-list

Re: Not found in the documentation

2021-04-26 Thread elas tica
Le mardi 27 avril 2021 à 01:44:04 UTC+2, Paul Bryan a écrit : > From > https://docs.python.org/3/reference/datamodel.html#the-standard-type-hierarchy > > : > Thanks for the reference. I was expecting to find this information in the Built-in Types section from the PSL documentation. The repr

Re: Not found in the documentation

2021-04-27 Thread elas tica
> Python has this thing called interactive mode that makes it possible to > discover answers even faster than looking in the docs To go further : Python has this thing called source code that makes it possible to discover answers even faster than looking in the docs -- https://mail.python.

Re: Not found in the documentation

2021-04-27 Thread elas tica
> However, in this case, the general information in the docs is > absolutely sufficient, and the basic principle that the repr should > (where possible) be a valid literal should explain what's needed. This is a subjective statement. Recall: explicit is better implicit. Alas, many parts of

Re: Not found in the documentation

2021-04-27 Thread elas tica
> The *Language Reference* is designed to be much more formally defined, and > favors correctness and completeness over being easy to access by less > technical readers. > Not really my opinion. Language Reference (LR) style is still written in a conversational style, giving examples instea

Re: Not found in the documentation

2021-04-27 Thread elas tica
Le mardi 27 avril 2021 à 01:44:04 UTC+2, Paul Bryan a écrit : > From > https://docs.python.org/3/reference/datamodel.html#the-standard-type-hierarchy > > : > > > The string representations of the numeric classes, computed > > by__repr__() and __str__(), have the following properties: > > * T

Re: Not found in the documentation

2021-04-28 Thread elas tica
Peter J. Holzer a écrit : > That's why it's called a container. But it also says *what* an object > must contain to be called a container. You could say that an int object > contains an integer value and a str object contains a reference to a > buffer containing the string - but those aren't re

Re: Not found in the documentation

2021-04-28 Thread elas tica
Le mercredi 28 avril 2021 à 17:36:32 UTC+2, Chris Angelico a écrit : > > if a string or a range object is a container or not. For instance, > > can we say that range(100) contains 42 ? > Not by that definition of container. Which definition? ;) > some objects have references to other object

Re: Not found in the documentation

2021-04-28 Thread elas tica
Le mercredi 28 avril 2021 à 17:36:32 UTC+2, Chris Angelico a écrit : > In what sense of the word "token" are you asking? The parser? You can > play around with the low-level tokenizer with the aptly-named > tokenizer module. It was a good suggestion, and the PLR doesn't mention the tokeniser m

Re: Not found in the documentation

2021-04-30 Thread elas tica
> > the docs are wrong when they say: > > > > .. > > using a backslash). A backslash is illegal elsewhere on a line outside a > > string literal. > > .. > > > You're not passing a backslash. Try print(s). > It would be