[issue31780] Using format spec ',x' displays incorrect error message

2017-10-13 Thread FHTMitchell
New submission from FHTMitchell <fergus@gmail.com>: Minor issue. Using the ',b', ',o' or ',x' raises the error ValueError("Cannot specify ',' or '_' with 'x'.",) (or equivalently for 'b' and 'o'). However, it is possible to use the format specs '_b', '_o' and '_x' in Pytho

[issue33555] No SyntaxError raised for `return` with argument inside generator

2018-05-17 Thread FHTMitchell
FHTMitchell <fergus@gmail.com> added the comment: Whoops I understand. Reclosed. -- resolution: -> not a bug status: open -> closed ___ Python tracker <rep...@bugs.python.org> <https://bugs.

[issue33555] No SyntaxError raised for `return` with argument inside generator

2018-05-17 Thread FHTMitchell
New submission from FHTMitchell <fergus@gmail.com>: In python 2.7 if you run the following code you get an error (as you would expect) Python 2.7.14 | packaged by conda-forge | (default, Dec 25 2017, 01:17:32) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "

[issue33555] No SyntaxError raised for `return` with argument inside generator

2018-05-17 Thread FHTMitchell
FHTMitchell <fergus@gmail.com> added the comment: Apologies if I wasn't clear. I understand that def f(): yield 1 return is valid python. What I'm saying, if you follow the link, is that def f(): yield 1 return 2 # not the argument should not be considered valid

[issue33055] bytes does not implement __bytes__()

2018-03-12 Thread FHTMitchell
New submission from FHTMitchell <fergus@gmail.com>: Every object which has a corresponding dunder protocol also implements said protocol with one exception: >>> 'hello'.__str__() 'hello' >>> (3.14).__float__() 3.14 >>> (101).__int__() 101 >>&g

[issue43923] Can't create generic NamedTuple as of py3.9

2021-04-23 Thread FHTMitchell
Change by FHTMitchell : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue43923> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue43923] Can't create generic NamedTuple as of py3.9

2021-04-23 Thread FHTMitchell
New submission from FHTMitchell : As of python 3.9, you now can't have multiple inheritance with `typing.NamedTuple` subclasses. This seems sensible, until you realise that `typing.Generic` works via inheritance. This fails whether or not `from __future__ import annotations` is enabled