[issue29022] Aritmetic error

2016-12-20 Thread Jacopo

New submission from Jacopo:

$ python
Python 2.7.3 (default, Jun 21 2016, 18:38:19) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 69.90 + 2.90
72.81

--
components: Interpreter Core
messages: 283684
nosy: r00ta
priority: normal
severity: normal
status: open
title: Aritmetic error
type: behavior
versions: Python 2.7

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



[issue38799] race condition in multiprocessing.Pool with maxtasksperchild=1

2020-01-18 Thread Jacopo Tediosi


Jacopo Tediosi  added the comment:

Happening to me on Python3.9 too
Also when calling pool.terminate(), causing my script to hang

--
nosy: +Jacopo Tediosi
versions: +Python 3.9 -Python 3.6

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



[issue22672] float arguments in scientific notation not supported by argparse

2014-10-19 Thread Jacopo Nespolo

New submission from Jacopo Nespolo:

Argparse fails to recognise negative numbers in scientific notation as valid 
numbers.

Example:
Suppose the program test.py has this option.
par.add_argument('-a', type=float)

then './test.py -a -1e5' will fail, as well as -1.0e-4, -.5E+4 and variations 
thereof.
Furthermore, at the current state, it seems that argparse does not recognize 
-1. as a valid float either.

I tried to hack argparse.py myself, and I believe the patch attached should fix 
this issue. The base version of argparse.py is the one from Python 3.4.2 as 
found in Debian Sid.

The modified regular expression seemed to behave correctly in all test cases I 
could come up with.

--
components: Library (Lib)
files: argparse.patch
keywords: patch
messages: 229689
nosy: jnespolo
priority: normal
severity: normal
status: open
title: float arguments in scientific notation not supported by argparse
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file36972/argparse.patch

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



[issue22672] float arguments in scientific notation not supported by argparse

2014-10-22 Thread Jacopo Nespolo

Changes by Jacopo Nespolo :


--
nosy: +bethard

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



[issue22672] float arguments in scientific notation not supported by argparse

2014-10-24 Thread Jacopo Nespolo

Jacopo Nespolo added the comment:

a better patch

--
Added file: http://bugs.python.org/file37007/argparse.patch

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



[issue22672] float arguments in scientific notation not supported by argparse

2014-10-24 Thread Jacopo Nespolo

Jacopo Nespolo added the comment:

test program that checks handling of a bunch of numbers.

--
Added file: http://bugs.python.org/file37008/test_argparse.py

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



[issue22672] float arguments in scientific notation not supported by argparse

2014-10-25 Thread Jacopo Nespolo

Jacopo Nespolo added the comment:

Ned Deily: I don't quite know how to use unittest, but I'll try to look into it.

paul j3:
> There I proposed leaving '_negative_number_matcher' unchanged, 
> but only use it to set '_has_negative_number_optionals'.

I don't know argparse internals but, if I understand your argument, I think you 
still need a '_negative_number_matcher' capable of correctly match any negative 
number in any form, including scientific notation, complex j, etc..
If this is the case, then, the matcher could be simplified to something like

'^-\d+|^-.\d+'

(notice $ removed from current regex) which would only signal that "something 
that starts like a negative number" is present.
Then one could use complex() or float() or whatever, to check that that's 
actually the case.

I would still expect an exception to be raised if, say, I specify type=float 
and then a complex value is passed as an argument.

--

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