[issue37554] Typo in os.rename docs
New submission from Roy Wellington : The documentation for os.rename (e.g., here, https://docs.python.org/3/library/os.html#os.rename but also for 3.8 and 3.9) currently reads, > On Unix, if src is a file and dst is a directory or vice-versa, anq:q > IsADirectoryError or a NotADirectoryError will be raised respectively. That "anq:q" should probably be just "an"; it appears someone tried to quit vim ;-) -- assignee: docs@python components: Documentation messages: 347647 nosy: docs@python, roy.wellington priority: normal severity: normal status: open title: Typo in os.rename docs versions: Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue37554> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22089] collections.MutableSet does not provide update method
New submission from Roy Wellington: Inheriting from collections.MutableSet mixes in several methods, however, it does not mix in a .update method. This can cause a variety of confusion if you expect a MutableSet to act like a set. Moreover, MutableMapping does provide a .update method, which makes me think this is a bug. I've attached a file that creates a bare-bones MutableSet, and shows the difference. Is this a bug, or is there some reason that MutableSet doesn't provide an update method? -- components: Library (Lib) files: ms.py messages: 224105 nosy: roy.wellington priority: normal severity: normal status: open title: collections.MutableSet does not provide update method versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file36125/ms.py ___ Python tracker <http://bugs.python.org/issue22089> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17626] set's __isub__ doesn't support non-sets.
New submission from Roy Wellington: The following: s = set(range(10)) s -= (1, 2, 3) raises a TypeError. Yet the following, which is more verbose and equivalent, succeeds: s.difference_update((1, 2, 3)) Under the hood, __isub__ calls difference_update to do its work. Unfortunately, __isub__ explicitly checks that the parameter is a set, even though difference_update can handle more than just sets. Could set.__isub__ just pass along the tuple to difference update, allowing __isub__ to operate on any iterable? For the purposes of "remove these elements from this set", any iterable works just as well as any other. It should O(number of elements to remove) in time (for sets, tuples, lists, etc.) and constant in memory, aside from the memory required for the parameters themselves. -- messages: 185941 nosy: Roy.Wellington priority: normal severity: normal status: open title: set's __isub__ doesn't support non-sets. type: behavior versions: Python 2.7, Python 3.2, Python 3.3 ___ Python tracker <http://bugs.python.org/issue17626> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com