[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: Documentation
messages: 382269
nosy: antocuni, docs@python
priority: normal
severity: normal
status: open
title: Improve the docs of most Py*_Check{,Exact} API calls
type: enhancement

___
Python tracker 
<https://bugs.python.org/issue42528>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/issue42528>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 
<http://bugs.python.org/issue9011>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 for parsing literals and converting 
strings, so you get -0.0 in both cases.

--

___
Python tracker 
<http://bugs.python.org/issue9011>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com