[issue41698] io.[Text]IOBase.seek doesn't take keyword parameter - revisited
Tomer Vromen added the comment: Just wanted to add that I encountered this today, went to file a ticket, and found this one. I'm fine with either style of documentation. -- nosy: +tomerv ___ Python tracker <https://bugs.python.org/issue41698> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37831] bool(~True) == True
New submission from Tomer Vromen : Bitwise operators have inconsistent behavior when acting on bool values: (Python 3.7.4) # "&" works like "and" >>> True & True True >>> True & False False >>> False & False False # "|" works like "or" >>> True | True True >>> True | False True >>> False | False False # "~" does not work like "not"! >>> ~True -2 >>> ~False -1 The result of this is the a user might start working with "&" and "|" on bool values (for whatever reason) and it will work as expected. But then, when adding "~" to the mix, things start to break. The proposal is to make "~" act like "not" on bool values, i.e. ~True will be False; ~False will be True. I'm not sure if this has any negative impact on existing code. I don't expect any, but you can never know. If there is no objection to this change, I can even try to implement it myself an submit a patch. -- components: Interpreter Core messages: 349452 nosy: tomerv priority: normal severity: normal status: open title: bool(~True) == True type: enhancement versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue37831> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36913] Missing documentation for decorators
New submission from Tomer Vromen : The documentation for decorators (for methods and classes) is pretty lacking. Searching for "decorator" ( https://docs.python.org/3/search.html?q=decorator ) brings up a lot of libraries that use decorators, but no documentation explaining what they are and how they work. The documentation should have a dedicated page for explaining decorators, and this should be the 1st search result. -- In the meantime, then search should give as a 1st result a link to the definition of decorator in the glossary: https://docs.python.org/3.7/glossary.html#glossary Actually, it seems that there is no way to directly link to a paragraph in the glossary - so that should be added as well. In general, it would be nice if a search for some term X would show as a 1st result the definition of X in the glossary (if it exists there). Thanks! -- assignee: docs@python components: Documentation messages: 342435 nosy: docs@python, tomerv priority: normal severity: normal status: open title: Missing documentation for decorators type: enhancement versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue36913> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36913] Missing documentation for decorators
Tomer Vromen added the comment: Thank you for the quick response. Are PEPs considered de-facto documentation for language features? For example, string formatting was described in PEP 3101, but still has sections in the documentation dedicated to it. I believe that decorators should get a similar treatment :-) I also think that describing decorators as part of the grammar definition is lacking. Why is there a whole chapter for Errors and Exceptions and it's not only discussed under the grammar definition for raise? Decorators are a pretty unique (and cool!) feature of Python, and therefore new learners of the language need a better reference for learning about them. I realize that this is a big request, as you would need some expert to write this documentation. -- ___ Python tracker <https://bugs.python.org/issue36913> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com