[issue36207] robotsparser deny all with some rules

2021-09-29 Thread Nico


Nico  added the comment:

Had same problem today for my website (https://www.bonus4casino.fr/), following 
for a fix

--
nosy: +nico.bonefato

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



[issue43786] slice(None) is slice(None) is False

2021-04-09 Thread Nico Schlömer

Nico Schlömer  added the comment:

Thanks very much, Steven, for the feedback and the suggestion.

--

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



[issue43786] slice(None) is slice(None) is False

2021-04-09 Thread Nico Schlömer

New submission from Nico Schlömer :

I stumbled upon this when dealing with NumPy arrays:
```
slice(None) is slice(None)
```
```
False
```
This came up when trying to check if a variable `a` equals `slice(None)`. The 
comparison
```
a = slice(None)
a == slice(None)
```
```
True
```
works, but doesn't return a single Boolean if a is a NumPy array, for example.

Perhaps there's another way of finding out if a variable is exactly 
`slice(None)`, but the failure of `is` seems like a bug.

--
messages: 390598
nosy: nschloe
priority: normal
severity: normal
status: open
title: slice(None) is slice(None) is False

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



[issue41386] Popen.wait does not account for negative return codes

2020-07-25 Thread Nico


Nico  added the comment:

Yeah I see the point.

To me it does make no sense because even in the windows API they seam to not 
know whether to use a ulong or a uint nor does this reflect the actual 
depiction within the program. 

However it is probably not worth implementing a flag for that nor to change the 
behavior entirely. This will create more problems than it would fix ambiguity. 

Thanks for taking the time and sorry for the inconvenience.

--
stage: patch review -> resolved
status: open -> closed

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



[issue41386] Popen.wait does not account for negative return codes

2020-07-24 Thread Nico


Nico  added the comment:

We apparently need a flag to ensure compatibility with the windows return codes

==
FAIL: test_disable_windows_exc_handler 
(test.test_faulthandler.FaultHandlerTests)
--
Traceback (most recent call last):
  File "D:\a\cpython\cpython\lib\test\test_faulthandler.py", line 825, in 
test_disable_windows_exc_handler
self.assertEqual(exitcode, 0xC005)
AssertionError: -1073741819 != 3221225477

--

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



[issue41386] Popen.wait does not account for negative return codes

2020-07-24 Thread Nico


Nico  added the comment:

I don't know if it should be a good idea to add a flag to turn off the negative 
conversation?

--

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



[issue41386] Popen.wait does not account for negative return codes

2020-07-24 Thread Nico


Change by Nico :


--
versions:  -Python 3.8

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



[issue41386] Popen.wait does not account for negative return codes

2020-07-24 Thread Nico


Change by Nico :


--
components: +Library (Lib) -Windows

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



[issue41386] Popen.wait does not account for negative return codes

2020-07-24 Thread Nico


Nico  added the comment:

I suggest implementing a singed conversation into _wait

--
keywords: +patch
message_count: 1.0 -> 2.0
pull_requests: +20749
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/21607

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



[issue41386] Popen.wait does not account for negative return codes

2020-07-24 Thread Nico


New submission from Nico :

Following problem occurred.

A C style program can have negative return codes. However this is not correctly 
implemented in the Windows API. Therefore it is being returned as unsigned long 
by the API hence it leads to ambiguity while comparing return codes.

For reference regarding this topic see:
https://docs.microsoft.com/en-us/cpp/cpp/main-function-command-line-args?redirectedfrom=MSDN=vs-2019
https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getexitcodeprocess

I suggest a

--
components: Windows
messages: 374194
nosy: MrTroble, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Popen.wait does not account for negative return codes
type: behavior
versions: Python 3.8

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



[issue31415] Add -X option to show import time

2018-07-01 Thread Nico Schlömer

Nico Schlömer  added the comment:

I just updated tuna [1] to support import time profiles as well.
Install with
```
pip install tuna
```
and use with
```
python -X importprofile yourfile.py 2> import.log
tuna import.log
```
See screenshot for example output.

Cheers,
Nico

[1] https://github.com/nschloe/tuna

--
nosy: +nschloe
Added file: https://bugs.python.org/file47663/sc.png

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



[issue29282] Fused multiply-add: proposal to add math.fma()

2018-02-21 Thread Nico Schlömer

Nico Schlömer <nico.schloe...@gmail.com> added the comment:

Okay, thanks for the info.

As a stop-gap measure, I've created pyfma [1, 2]. Install with
```
pip install pyfma
```
and use with
```
pyfma.fma(3.0, 2.0, 1.0)
```
Only works on Unix reliable then, but that's all I care about. :)

Cheers,
Nico

[1] https://github.com/nschloe/pyfma
[2] https://pypi.python.org/pypi/pyfma

--

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



[issue29282] Fused multiply-add: proposal to add math.fma()

2018-02-20 Thread Nico Schlömer

Nico Schlömer <nico.schloe...@gmail.com> added the comment:

> Existing libm implementations don't work,

Okay. Is this because of the inf/NaN discrimination hiccups mentioned above or 
are there any other pitfalls?

--

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



[issue29282] Fused multiply-add: proposal to add math.fma()

2018-02-20 Thread Nico Schlömer

Nico Schlömer <nico.schloe...@gmail.com> added the comment:

Do I read this thread correctly assuming that this hasn't been implemented yet? 
If not, I would probably make my own little library for this -- I really need 
the feature for the precision.

--
nosy: +nschloe

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



[issue29522] PyLong_AsDouble Behaviour is Weird

2017-02-10 Thread nico

New submission from nico:

I'm using the pre-installed version of Python 2.7.12 on Ubuntu 16.04. Pretty 
straight forward error the following code:

PyObject * intobj = PyInt_FromLong(10);
double d1 = (double)PyLong_AsLong(intobj);
double d2 = PyLong_AsDouble(intobj);
printf("Should be the same: %f vs %f", d1, d2);

Does not display the same number for both double since `PyLong_AsDouble` raises 
the error, SystemError: ../Objects/longobject.c:2336: bad argument to internal 
function and returns -1.0 instead of 10.0.

--
components: Build
messages: 287486
nosy: nico
priority: normal
severity: normal
status: open
title: PyLong_AsDouble Behaviour is Weird
versions: Python 2.7

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



[issue9720] zipfile writes incorrect local file header for large files in zip64

2013-01-04 Thread Nico Möller

Nico Möller added the comment:

I most definitely need a patch for 2.7.3 

Would be awesome if you could provide a patch for that version.

--
nosy: +Nico.Möller

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9720
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8609] itertools: problem with nested groupby, list()

2010-05-04 Thread Nico

New submission from Nico nico.schloe...@gmail.com:

Hi,

I ran into a bit of an unexpected issue here with itertools.

I need to say that I discovered itertools only recently, and that maybe my way 
of approaching the problem is not what I want to do. If you think this may be 
the case, please let me know.

Anyway, the problem is the following:
I have a list of dictionaries, something like

[ { a: 1, b: 1, c: 3 },
  { a: 1, b: 1, c: 4 },
  ...
]

and I'd like to iterate through all items with, e.g., a:1. What I do is sort 
and then groupby,

my_list.sort( key=operator.itemgetter('a') )
my_list_grouped = itertools.groupby( my_list, operator.itemgetter('a') )

and then just very simply iterate over my_list_grouped,

for my_item in my_list_grouped:
# do something with my_item[0], my_item[1]

Now, inside this loop I'd like to again iterate over all items with the same 
'b'-value -- no problem, just do the above inside the loop:

for my_item in my_list_grouped:
# group by keyword b
my_list2 = list( my_item[1] )
my_list2.sort( key=operator.itemgetter('b') )
my_list_grouped = itertools.groupby( my_list2, operator.itemgetter('b') 
)
for e in my_list_grouped:
# do something with e[0], e[1]

That seems to work all right.

Now, the problem occurs when this all is wrapped into an outer loop, such as

for k in [ 'first pass', 'second pass' ]:
for my_item in my_list_grouped:
# bla, the above

To be able to iterate more than once through my_list_grouped, I have to convert 
it into a list first, so outside all loops, I go like

my_list.sort( key=operator.itemgetter('a') )
my_list_grouped = itertools.groupby( my_list, operator.itemgetter('a') )
my_list_grouped = list( my_list_grouped )

This, however, makes it impossible to do the inner sort and groupby-operation; 
you just get the very first element, and that's it.

An example file is attached.

Is there anything that I can do to debug?

Cheers,
Nico

--
components: None
files: iterator-test.py
messages: 104917
nosy: nicki
priority: normal
severity: normal
status: open
title: itertools: problem with nested groupby, list()
versions: Python 2.6
Added file: http://bugs.python.org/file17198/iterator-test.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8609
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8609] itertools: problem with nested groupby, list()

2010-05-04 Thread Nico

Nico nico.schloe...@gmail.com added the comment:

Okay, thanks for the hint.
Closing as invalid.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8609
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com