[issue45384] Accept Final as indicating ClassVar for dataclass

2021-10-14 Thread Michael Sullivan
Michael Sullivan added the comment: I tend to agree with Carl that making Final imply ClassVar for dataclass would make things worse. For better or worse (mostly better, but there are downsides like this!), dataclass class bodies are essentially written in their own domain specific

[issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore

2019-05-22 Thread Michael Sullivan
Michael Sullivan added the comment: I think there will be one more PR to disallow non-ASCII characters immediately after a `# type: ignore`, but otherwise I think this is done -- ___ Python tracker <https://bugs.python.org/issue36

[issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore

2019-05-21 Thread Michael Sullivan
Change by Michael Sullivan : -- pull_requests: +13391 ___ Python tracker <https://bugs.python.org/issue36878> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore

2019-05-10 Thread Michael Sullivan
Change by Michael Sullivan : -- keywords: +patch pull_requests: +13148 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36878> ___ _

[issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore

2019-05-10 Thread Michael Sullivan
New submission from Michael Sullivan : Per discussion during the typing summit at PyCon, it would be a good idea to allow extra information to be included in `# type: ignore` comments, in order to allow behavior such as suppressing individual errors (for example, with syntax like `# type

[issue35975] Put back the ability to parse files where async/await aren't keywords

2019-02-26 Thread Michael Sullivan
Change by Michael Sullivan : -- nosy: +msullivan ___ Python tracker <https://bugs.python.org/issue35975> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34235] PyArg_ParseTupleAndKeywords: support required keyword arguments

2019-02-15 Thread Michael Sullivan
Michael Sullivan added the comment: A downside of the "allow $ twice" approach is that it means splitting up the positional arguments, and a lot of the processing loop is built around the assumption that the index into the keyword list and the index into the argument tupl

[issue34235] PyArg_ParseTupleAndKeywords: support required keyword arguments

2019-02-15 Thread Michael Sullivan
Michael Sullivan added the comment: The point about a performance penalty is fair---my PR does add a search for the '@' (which I spelled as '`' in my example above) sigil whenever it encounters a '|'. (Though I'm not sure how big the impact would be? Format strings are small so a quick scan

[issue34235] PyArg_ParseTupleAndKeywords: support required keyword arguments

2019-02-12 Thread Michael Sullivan
Change by Michael Sullivan : -- keywords: +patch pull_requests: +11865 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34235> ___ _

[issue34235] PyArg_ParseTupleAndKeywords: support required keyword arguments

2019-02-01 Thread Michael Sullivan
Michael Sullivan added the comment: How about adding another sigil that indicates that subsequent keyword-only arguments are required? So then your example becomes (using ` as a totally strawman option): PyArg_ParseTupleAndKeywords(args, kwds, "O|O$O`O", kwlist, , , , ) It'

.format won't display my value with 2 decimal places: Why?

2016-01-24 Thread Michael Sullivan
Hi. I'm very very new to python. I have been working my way through a free python pdf file I found (python3handson.pdf) and I'm having trouble with one of my programs: '''discount.py Exercise 1.14.3.1. * Write a program, discount.py, that prompts the user for an original price and for a