[issue31118] Make super() work with staticmethod by using __class__ for both arguments to super()
Changes by Ashwini Chaudhary : -- components: +Interpreter Core ___ Python tracker <http://bugs.python.org/issue31118> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31118] Make super() work with staticmethod by using __class__ for both arguments to super()
New submission from Ashwini Chaudhary: >From this question I noticed that super() doesn't work with static methods >with no arguments: https://stackoverflow.com/q/45498675/846892 My question is what's the issue with using __class__ for both arguments to super() in case of static method? Or was it just an oversight. -- messages: 299733 nosy: ashwch priority: normal severity: normal status: open title: Make super() work with staticmethod by using __class__ for both arguments to super() type: enhancement versions: Python 3.7 ___ Python tracker <http://bugs.python.org/issue31118> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27412] float('∞') returns 8.0
Ashwini Chaudhary added the comment: float('∞') raised ValueError as expected: ValueError: could not convert string to float: '∞' I am not sure how you ended up with 8.0. -- nosy: +ashwch ___ Python tracker <http://bugs.python.org/issue27412> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25665] typing.NamedTuple instances are not picklable.
Ashwini Chaudhary added the comment: Attached patch. -- keywords: +patch Added file: http://bugs.python.org/file41073/issue25665.patch ___ Python tracker <http://bugs.python.org/issue25665> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25665] typing.NamedTuple instances are not picklable.
New submission from Ashwini Chaudhary: Currently namedtuple(https://hg.python.org/cpython/file/3.5/Lib/collections/__init__.py#l418) sets the `__module__` attribute by looking up `__name__` in calling frame's globals. As in the case of `typing.NamedTuple` it is always going to be 'typing' pickle will raise an error. Instead of this `typing.NamedTuple` should override the `__module__` attribute itself because it has info about the actual caller frame. Something like this should work fine: ``` def NamedTuple(typename, fields): fields = [(n, t) for n, t in fields] cls = collections.namedtuple(typename, [n for n, t in fields]) cls._field_types = dict(fields) try: cls.__module__ = sys._getframe(1).f_globals.get('__name__', '__main__') except (AttributeError, ValueError): pass return cls ``` Related: http://stackoverflow.com/q/33796490/846892 -- components: Library (Lib) messages: 254883 nosy: montysinngh priority: normal severity: normal status: open title: typing.NamedTuple instances are not picklable. versions: Python 3.5 ___ Python tracker <http://bugs.python.org/issue25665> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13510] Clarify that readlines() is not needed to iterate over a file
Changes by Ashwini Chaudhary : -- nosy: +montysinngh ___ Python tracker <http://bugs.python.org/issue13510> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17383] Error in documentation /2/tutorial/modules.html#more-on-modules
Changes by Ashwini Chaudhary : -- nosy: +montysinngh ___ Python tracker <http://bugs.python.org/issue17383> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16701] Docs missing the behavior of += (in-place add) for lists.
New submission from Ashwini Chaudhary: I think the python docs are missing the behavior of += for lists. It actually calls list.extend() but can't find that anywhere in docs expect in source code, http://hg.python.org/cpython/file/2d2d4807a3ed/Objects/listobject.c#l892. -- assignee: docs@python components: Documentation messages: 177627 nosy: docs@python, montysinngh priority: normal severity: normal status: open title: Docs missing the behavior of += (in-place add) for lists. type: enhancement versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker <http://bugs.python.org/issue16701> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com