Danny Yoo added the comment:
Alternatively, change the representation of flag values from integers to some
class extension that supports the common bitwise operators.
As a very rough sketch:
>>> class FlagInt(int):
... def __or__(self, other):
... return FlagInt(int(se
Danny Yoo added the comment:
Ugh. I suddenly realize that this is complicated by the fact that flag values
are themselves represented as integers, and Python's type system isn't rich
enough to label flag values as a distinct type for the purposes.
It may be worthwhile to add a warning
New submission from Danny Yoo:
This comes from diagnosing a beginner's question on Python-tutor.
https://mail.python.org/pipermail/tutor/2016-December/110066.html
It appears that re.sub is not checking whether the count argument is integer or
not, and silently accepts a nonsensical argument
Danny Yoo added the comment:
Unfortunately, fixing just zlib.crc32 isn't quite enough for our purposes. We
still will see OverflowErrow in zipfile if compression is selected.
Demonstration code:
import zipfile
## Possible workaround: monkey
New submission from Danny Yoo:
Reproduction steps:
---
$ python2.7 -c import zlib;zlib.crc32('a'*(131))
Traceback (most recent call last):
File string, line 1, in module
OverflowError: size does not fit in an int
---
We ran into this bug in zlib.crc32 when using zipfile.writestr
Changes by Danny Yoo danny...@google.com:
--
title: zlib.crc32 raises OverflowError at argument-parsing time on large
strings - Within zipfile, use of zlib.crc32 raises OverflowError at
argument-parsing time on large strings
___
Python tracker rep
On Thu, Oct 16, 2014 at 8:21 AM, C@rlos cmfer...@estudiantes.uci.cu wrote:
I have been tryed to convert a Qstring text to string on python, in linux
that work fine but in windows when qstring contine á,é,í,ó,ú the converted
text is not correct, contine extranger characters,
this qstring text
On Thu, 25 May 2006, Thomas Thomas wrote:
I am trying to access a mapped network drive folder. everything works
fine normally. But when i run the application as service I am getting
the error
The error is on the line:
for filename in os.listdir(folder):#line 25
and I have to
Advance notice: We need speakers for January and later. Please send
e-mail to [EMAIL PROTECTED] if you want to suggest an agenda (or
volunteer to give a presentation).
Correction: that email address should be '[EMAIL PROTECTED]'.
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 14 Nov 2005, enas khalil wrote:
hello all
[program cut]
Hi Enas,
You may want to try talking with NTLK folks about this, as what you're
dealing with is a specialized subject. Also, have you gone through the
tokenization tutorial in:
On Mon, 6 Dec 2004, Alfred Canoy wrote:
Please help me out:(.. I've been trying to figure this out for 2 days
now.. I don't know what to use to print all the list of numbers. I hve
know idea how should I do this. I tried a lot of trial error for the
the def, dict, .list( ). have no luck.
11 matches
Mail list logo