[issue42528] Improve the docs of most Py*_Check{,Exact} API calls

2020-12-01 Thread Antonio Cuni
Change by Antonio Cuni : -- keywords: +patch pull_requests: +22471 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23602 ___ Python tracker <https://bugs.python.org/issu

[issue42528] Improve the docs of most Py*_Check{,Exact} API calls

2020-12-01 Thread Antonio Cuni
New submission from Antonio Cuni : I think that none of these API calls can fail, but only few of them are documented as such. E.g. PyNumber_Check contains the sentece "This function always succeeds" but PyBytes_Check does not. -- assignee: docs@python components: Doc

[issue9011] ast_for_factor unary minus optimization changes AST

2012-10-18 Thread Antonio Cuni
Antonio Cuni added the comment: I would say that the complex-from-string constructor should be fixed to handle this special case "correctly". I find very confusing that we get a different result whether we use a string literal or not. For example, in pypy we use the same code f

[issue9011] ast_for_factor unary minus optimization changes AST

2012-10-18 Thread Antonio Cuni
Antonio Cuni added the comment: there is still an inconsistency in handling negative imaginary literals: >>> -1j.real -0.0 >>> complex('-1j').real 0.0 -- nosy: +antocuni ___ Python tracker <h