Twisted 10.2.0, the third Twisted release of 2010, has emerged from the
mysterious depths of Twisted Matrix Labs, as so many releases before it.
Survivors of the release process - what few there were of them - have been
heard to claim that this version is awesome, even more robust, fun-sized
Is there a cursor or connection property that returns the number
of rows affected by a SQLite update or delete command?
Or, if we want this information, do we have to pre-query our
database for a count of records that will be affected by an
operation?
Thank you,
Malcolm
--
On Tue, Nov 30, 2010 at 2:29 PM, pyt...@bdurham.com wrote:
Is there a cursor or connection property that returns the number of rows
affected by a SQLite update or delete command?
The cursor has a rowcount attribute. The documentation of the sqlite3
module says the implementation is quirky.
Dan Stromberg drsali...@gmail.com wrote:
I've got a couple of programs that read filenames from stdin, and then
open those files and do things with them. These programs sort of do
the *ix xargs thing, without requiring xargs.
In Python 2, these work well. Irrespective of how filenames are
Hi all,
I have a big file 1.5GB in size, with about 6 million lines of
tab-delimited data. I have to perform some filtration on the data and
keep the good data. After filtration, I have about 5.5 million data left
remaining. As you might already guessed, I have to read them in batches
and I
Dan Stromberg wrote:
I've got a couple of programs that read filenames from stdin, and then
open those files and do things with them. These programs sort of do
the *ix xargs thing, without requiring xargs.
In Python 2, these work well. Irrespective of how filenames are
encoded, things
OW Ghim Siong wrote:
I have a big file 1.5GB in size, with about 6 million lines of
tab-delimited data.
How many fields are there an each line?
I have to perform some filtration on the data and
keep the good data. After filtration, I have about 5.5 million data left
remaining. As you might
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Dear User,
ANNOUNCE:Major Feature Release
libmsgque: Application-Server-Toolkit for
C, C++, JAVA, C#, Go, TCL, PERL, PHP, PYTHON, RUBY, VB.NET
PLMK: Programming-Language-Microkernel
OW Ghim Siong wrote:
Hi all,
I have a big file 1.5GB in size, with about 6 million lines of
tab-delimited data. I have to perform some filtration on the data and
keep the good data. After filtration, I have about 5.5 million data left
remaining. As you might already guessed, I have to read
On Sunday 28 November 2010, 16:22:33 News123 wrote:
Hi,
I wondered whether there is a simpe way to
'remote' control fire fox with python.
With remote controlling I mean:
- enter a url in the title bar and click on it
- create a new tab
- enter another url click on it
- save the html
In article
58fe3680-21f5-42f8-9341-e069cbb88...@r19g2000prm.googlegroups.com,
rustom rustompm...@gmail.com wrote:
Looking around I found this:
http://bytes.com/topic/python/answers/43330-unittest-vs-py-test
where Raymond Hettinger no less says quite unequivocally that he
prefers test.py to
On Tue, 2010-11-30 at 11:52 +0100, Peter Otten wrote:
Dan Stromberg wrote:
I've got a couple of programs that read filenames from stdin, and
then
open those files and do things with them. These programs sort of do
the *ix xargs thing, without requiring xargs.
In Python 2, these work
I've been reading through the docs for contextlib and PEP 343, and
came across this:
Note that we're not guaranteeing that the finally-clause is
executed immediately after the generator object becomes unused,
even though this is how it will work in CPython.
...referring to context
Dear customers, thank you for your support of our company.
Here, there's good news to tell you: The company recently
launched a number of new fashion items! ! Fashionable
and welcome everyone to come buy. If necessary, please
plut: http://www.vipshops.org ==
http://www.vipshops.org
I'm basically a c/c++ programmer and recently come to python for some web
development. Using django and javascript I'm afraid I can develop some web
application now. But often I feel I'm not good at python. I don't know much
about generators, descriptors and decorators(although I can use some of
Most of the examples presented here can use the decorator pattern instead.
Especially the window system
On Mon, Nov 29, 2010 at 5:27 PM, Gregory Ewing
greg.ew...@canterbury.ac.nzwrote:
Paul Rubin wrote:
The classic example though is a window system, where you have a window
class, and a
Jason jason.hee...@gmail.com wrote:
As I understood it, when the with block exits, the __exit__() method
is called immediately. This calls the next() method on the underlying
generator, which forces it to run to completion (and raise a
StopIteration), which includes the finally clause...
Hello,
Following a discussion that began 3 weeks ago I would like to ask a
question regarding substitution of letters according to grammatical
rules in historical linguistics. I would like to automate the
transformation of words according to complex rules of phonology and
integrate that script in
Hi everyone ,
I have a requirement of displaying my data in a textCtrl like widget , but
i need that the data in the row be clickable ,
so as when i click the data i could be able to get fire and even and get me
the selected data value.After a long
search i found ListBox to be perfect for my use
On 11/30/2010 04:29 AM, OW Ghim Siong wrote:
a=open(bigfile)
matrix=[]
while True:
lines = a.readlines(1)
for line in lines:
data=line.split(\t)
if several_conditions_are_satisfied:
matrix.append(data)
print Number of lines read:, len(lines),
On Mon, 29 Nov 2010 15:11:28 -0800 (PST)
Spider matt...@cuneiformsoftware.com wrote:
2.7 includes many features that were first released in Python 3.1. The
faster io module ...
I understand that I/O in Python 3.0 was slower than 2.x (due to quite
a lot of the code being in Python rather
On Mon, 29 Nov 2010 21:52:07 -0800 (PST)
Yingjie Lan lany...@yahoo.com wrote:
--- On Tue, 11/30/10, Dan Stromberg drsali...@gmail.com wrote:
In Python 3, I'm finding that I have encoding issues with
characters
with their high bit set. Things are fine with strictly
ASCII
filenames.
On Tue, 30 Nov 2010 18:29:35 +0800
OW Ghim Siong o...@bii.a-star.edu.sg wrote:
Does anyone know why is there such a big difference memory usage when
storing the matrix as a list of list, and when storing it as a list of
string?
That's because any object has a fixed overhead (related to
Howdy Xavier!
[Apologies for the length of this; I didn't expect to write so much!]
I've been a Python programmer for many years now (having come from a
PHP, Perl, C, and Pascal background) and I'm constantly learning new
idioms and ways of doing things that are more Pythonic; cleaner, more
Iran slams Wiki-release as US psywar - WIKILEAKS is replacing those
BIN LADEN communiques of CIA (the global ELITE) intended to threaten
MASSES
CIA is the criminal agency of the global elite.
They want to destroy the middle class from the planet and also create
a global tyranny of a police
On Nov 28, 4:22 pm, News123 news1...@free.fr wrote:
Hi,
I wondered whether there is a simpe way to
'remote' control fire fox with python.
With remote controlling I mean:
- enter a url in the title bar and click on it
- create a new tab
- enter another url click on it
- save the html
Terry Reedy tjre...@udel.edu writes:
On 11/28/2010 3:47 PM, pyt...@bdurham.com wrote:
I had planned on subclassing Tkinter.Toplevel() using property() to wrap
access to properties like a window's title.
After much head scratching and a peek at the Tkinter.py source, I
realized that all
Albert Hopkins wrote:
On Tue, 2010-11-30 at 11:52 +0100, Peter Otten wrote:
Dan Stromberg wrote:
I've got a couple of programs that read filenames from stdin, and
then
open those files and do things with them. These programs sort of do
the *ix xargs thing, without requiring xargs.
Giacomo Boffi wrote:
Terry Reedy tjre...@udel.edu writes:
On 11/28/2010 3:47 PM, pyt...@bdurham.com wrote:
I had planned on subclassing Tkinter.Toplevel() using property() to wrap
access to properties like a window's title.
After much head scratching and a peek at the Tkinter.py source, I
On 11/30/10 11:00 AM, Giacomo Boffi wrote:
Terry Reedytjre...@udel.edu writes:
On 11/28/2010 3:47 PM, pyt...@bdurham.com wrote:
I had planned on subclassing Tkinter.Toplevel() using property() to wrap
access to properties like a window's title.
After much head scratching and a peek at the
I am not sure how to proceed.
I am writing a Python interface to a C library.
The C library uses structures.
I was looking at the struct module but struct.unpack only seems to
deal with data that was packed using struct.pack or some other buffer.
All I have is the struct itself, a pointer in C.
Is
I know nothing is ever free and that is true. However, you can get
things really cheap. Two offers I am working on right now are: (Copy
and Paste link into your web browser)
A Free iPod 64gb - http://www.YouriPodTouch4free.com/index.php?ref=6695331
Here is how it works:
You click on one of
On Tue, Nov 30, 2010 at 10:57 AM, Eric Frederich
eric.freder...@gmail.com wrote:
I am not sure how to proceed.
I am writing a Python interface to a C library.
The C library uses structures.
I was looking at the struct module but struct.unpack only seems to
deal with data that was packed using
Does anyone know what I need to do to read filenames from stdin with
Python 3.1 and subsequently open them, when some of those filenames
include characters with their high bit set?
If your files on disk use file names encoded in iso-8859-1, don't set
your locale to a UTF-8 locale (as you
Hello all,
In a script I would like to extract all device infos from block or
character device. The stat function gives me most of the infos
(mode, timestamp, user and group id, ...), however I did not find how
to get the devices major and minor numbers. Of course I could do it by
calling an
On Tue, 30 Nov 2010 21:09:14 +0100, Thomas Portmann wrote:
Hello all,
In a script I would like to extract all device infos from block or
character device. The stat function gives me most of the infos (mode,
timestamp, user and group id, ...), however I did not find how to get
the devices
OW Ghim Siong o...@bii.a-star.edu.sg writes:
I have a big file 1.5GB in size, with about 6 million lines of
tab-delimited data. I have to perform some filtration on the data and
keep the good data. After filtration, I have about 5.5 million data
left remaining. As you might already guessed, I
Hi,
I'm trying to parse an xml file using SAX. About half-way through a
file I get this error:
Traceback (most recent call last):
File C:\Python26\Lib\site-packages\pythonwin\pywin\framework
\scriptutils.py, line 325, in RunScript
exec codeObject in __main__.__dict__
File E:\sc\b2.py,
get a free domain , free design , and free host
http://freedesignandhost.co.cc/
get a free domain , free design , and free host
http://freedesignandhost.co.cc/free-design.php
http://freedesignandhost.co.cc/free-host.php
http://freedesignandhost.co.cc/free-domain.php
--
On Tue, Nov 30, 2010 at 9:18 PM, Dan M d...@catfolks.net wrote:
On Tue, 30 Nov 2010 21:09:14 +0100, Thomas Portmann wrote:
In the example below, I would like to get the major (8) and minor (0, 1,
2) numbers of /dev/sda{,1,2}. How can I get them?
I think the os.major() and os.minor() calls
On Tue, 30 Nov 2010 21:35:43 +0100, Thomas Portmann wrote:
Thank you very much Dan, this is exactly what I was looking for.
Tom
You're very welcome.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I'm trying to parse an xml file using SAX. About half-way through a
file I get this error:
Traceback (most recent call last):
File C:\Python26\Lib\site-packages\pythonwin\pywin\framework
\scriptutils.py, line 325, in RunScript
exec codeObject in __main__.__dict__
File E:\sc\b2.py,
On 11/30/2010 3:43 PM, goldtech wrote:
Hi,
I'm trying to parse an xml file using SAX. About half-way through a
file I get this error:
Traceback (most recent call last):
File C:\Python26\Lib\site-packages\pythonwin\pywin\framework
\scriptutils.py, line 325, in RunScript
exec
Please, give me an example of raw query to IMAP server?
And why do you focus on Nevermind is so ekhm... nevermind... ??
Cannot you just help?
--
http://mail.python.org/mailman/listinfo/python-list
snip...
I'm just as stumped as I was when you first asked this question 13
minutes ago. ;-)
regards
Steve
snip...
Hi Steve,
Think I found it, for example:
line = 'my big string'
line.encode('ascii', 'ignore')
I processed the problem strings during parsing with this and it works
now.
can't check right now but are you sure it's the parser and not
this line
d.write(csv+\n)
that's failing?
what is d?
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 2010-11-30 at 13:03 -0800, pakalk wrote:
Please, give me an example of raw query to IMAP server?
http://www.devshed.com/c/a/Python/Python-Email-Libraries-part-2-IMAP/2/
I'm not certain what you mean by raw query.
And why do you focus on Nevermind is so ekhm... nevermind... ??
Cannot
Hi all,
Sorry, newbie question:
I have database in a plain text file (could be .txt or .dat, it's the
same) that I need to read in python in order to do some data
validation. In other files I read this kind of files with the split()
method, reading line by line. But split() relies on a separator
Hi,
multithreading.pool Pool has a promissing initializer argument in its
constructor.
However it doesn't look possible to use it to initialize each Pool's
worker with some individual value (I'd wish to be wrong here)
So, how to initialize each multithreading Pool worker with the
individual
On 30 Lis, 22:26, Adam Tauno Williams awill...@whitemice.org wrote:
On Tue, 2010-11-30 at 13:03 -0800, pakalk wrote:
Please, give me an example of raw query to IMAP server?
http://www.devshed.com/c/a/Python/Python-Email-Libraries-part-2-IMAP/2/
I'm not certain what you mean by raw query.
m
On 2010-11-30, javivd javiervan...@gmail.com wrote:
I have a case now in wich another file has been provided (besides the
database) that tells me in wich column of the file is every variable,
because there isn't any blank or tab character that separates the
variables, they are stick together.
I have situation where I need to be able to get the current active
user, and catch user switching eg user1 locks screen, leaves computer,
user2 comes, and logs on.
basically, when there is any type of user switch my script needs to
know.
--
http://mail.python.org/mailman/listinfo/python-list
On 2010-11-30, mpnordland mpnordl...@gmail.com wrote:
I have situation where I need to be able to get the current active
user, and catch user switching eg user1 locks screen, leaves computer,
user2 comes, and logs on.
basically, when there is any type of user switch my script needs to
know.
On Wed, Dec 1, 2010 at 8:54 AM, Tim Harig user...@ilthio.net wrote:
Well you could use inotify to trigger on any changes to /var/log/wtmp.
When a change is detected, you could check of deltas in the output of who
-a to figure out what has changed since the last time wtmp triggered.
This is a
On 11/30/2010 9:37 AM, Xavier Heruacles wrote:
I'm basically a c/c++ programmer and recently come to python for some
web development. Using django and javascript I'm afraid I can develop
some web application now. But often I feel I'm not good at python. I
don't know much about generators,
On 30/11/2010 21:31, javivd wrote:
Hi all,
Sorry, newbie question:
I have database in a plain text file (could be .txt or .dat, it's the
same) that I need to read in python in order to do some data
validation. In other files I read this kind of files with the split()
method, reading line by
2010/11/30 Dax Bloom bloom@gmail.com:
Hello,
Following a discussion that began 3 weeks ago I would like to ask a
question regarding substitution of letters according to grammatical
rules in historical linguistics. I would like to automate the
transformation of words according to complex
On Tue, Nov 30, 2010 at 11:47 AM, Martin v. Loewis mar...@v.loewis.de wrote:
Does anyone know what I need to do to read filenames from stdin with
Python 3.1 and subsequently open them, when some of those filenames
include characters with their high bit set?
If your files on disk use file
On Tue, Nov 30, 2010 at 7:19 AM, Antoine Pitrou solip...@pitrou.net wrote:
On Mon, 29 Nov 2010 21:52:07 -0800 (PST)
Yingjie Lan lany...@yahoo.com wrote:
--- On Tue, 11/30/10, Dan Stromberg drsali...@gmail.com wrote:
In Python 3, I'm finding that I have encoding issues with
characters
with
On Tue, Nov 30, 2010 at 9:53 AM, Peter Otten __pete...@web.de wrote:
$ ls
$ python3
Python 3.1.1+ (r311:74480, Nov 2 2009, 15:45:00)
[GCC 4.4.1] on linux2
Type help, copyright, credits or license for more information.
with open(b\xe4\xf6\xfc.txt, w) as f:
... f.write(hello\n)
...
6
This works for me:
def sendList():
return [item0, item1]
def query():
l=sendList()
return [Formatting only {0} into a string.format(l[0]), l[1]]
query()
However, is there a way to bypass the
l=sendList()
and change one list item in-place? Possibly a list comprehension
operating
On Tue, Nov 30, 2010 at 1:35 PM, Valery Khamenya khame...@gmail.com wrote:
Hi,
multithreading.pool Pool has a promissing initializer argument in its
constructor.
However it doesn't look possible to use it to initialize each Pool's
worker with some individual value (I'd wish to be wrong here)
On Mon, 29 Nov 2010 21:26:23 -0800, Dan Stromberg wrote:
Does anyone know what I need to do to read filenames from stdin with
Python 3.1 and subsequently open them, when some of those filenames
include characters with their high bit set?
Use bytes rather than str. Everywhere. This means
On Tue, Nov 30, 2010 at 6:37 AM, Xavier Heruacles xheruac...@gmail.com wrote:
I'm basically a c/c++ programmer and recently come to python for some web
development. Using django and javascript I'm afraid I can develop some web
application now. But often I feel I'm not good at python. I don't
On Tue, 30 Nov 2010 18:53:14 +0100, Peter Otten wrote:
I think this is wrong. In Unix there is no concept of filename
encoding. Filenames can have any arbitrary set of bytes (except '/' and
'\0'). But the filesystem itself neither knows nor cares about
encoding.
I think you
On 01/12/2010 01:08, Gnarlodious wrote:
This works for me:
def sendList():
return [item0, item1]
def query():
l=sendList()
return [Formatting only {0} into a string.format(l[0]), l[1]]
query()
However, is there a way to bypass the
l=sendList()
and change one list item
Have you considered entering all this data into an SQLite database?
You could do fast searches based on any features you deem relevant to
the phoneme. Using an SQLite editor application you can get started
building a database right away. You can add columns as you get the
inspiration, along with
Thanks.
Unless someone has a simpler solution, I'll stick with 2 lines.
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 30, 11:43 pm, Tim Harig user...@ilthio.net wrote:
On 2010-11-30, javivd javiervan...@gmail.com wrote:
I have a case now in wich another file has been provided (besides the
database) that tells me in wich column of the file is every variable,
because there isn't any blank or tab
On 01/12/2010 01:28, Nobody wrote:
On Tue, 30 Nov 2010 18:53:14 +0100, Peter Otten wrote:
I think this is wrong. In Unix there is no concept of filename
encoding. Filenames can have any arbitrary set of bytes (except '/' and
'\0'). But the filesystem itself neither knows nor cares about
On 01/12/2010 02:03, javivd wrote:
On Nov 30, 11:43 pm, Tim Hariguser...@ilthio.net wrote:
On 2010-11-30, javivdjaviervan...@gmail.com wrote:
I have a case now in wich another file has been provided (besides the
database) that tells me in wich column of the file is every variable,
because
On Wed, Dec 1, 2010 at 7:35 AM, Valery Khamenya khame...@gmail.com wrote:
multithreading.pool Pool has a promissing initializer argument in its
constructor.
However it doesn't look possible to use it to initialize each Pool's
worker with some individual value (I'd wish to be wrong here)
So,
On 11/30/2010 08:03 PM, javivd wrote:
On Nov 30, 11:43 pm, Tim Hariguser...@ilthio.net wrote:
VARIABLE NAME POSITION (COLUMN) IN FILE
var_name_1 123-123
var_name_2 124-125
var_name_3 126-126
..
..
var_name_N 512-513 (last
Hi there,
I'm currently writing an application to control and take measurements during
an experiments. This is to be done on an embedded computer running XPe so I
am happy to have python available, although I am pretty new to it.
The application basically runs as a state machine, which
On Wed, 2010-12-01 at 02:14 +, MRAB wrote:
If the filenames are to be shown to a user then there needs to be a
mapping between bytes and glyphs. That's an encoding. If different
users use different encodings then exchange of textual data becomes
difficult.
That's presentation, that's
On 11/30/2010 8:28 PM, MRAB wrote:
On 01/12/2010 01:08, Gnarlodious wrote:
This works for me:
def sendList():
return [item0, item1]
def query():
l=sendList()
return [Formatting only {0} into a string.format(l[0]), l[1]]
query()
However, is there a way to bypass the
On 2010-12-01, javivd javiervan...@gmail.com wrote:
On Nov 30, 11:43 pm, Tim Harig user...@ilthio.net wrote:
On 2010-11-30, javivd javiervan...@gmail.com wrote:
I have a case now in wich another file has been provided (besides the
database) that tells me in wich column of the file is every
Hi all,
Would like to search list of directories with specific pattern and delete
it?.. How can i do it?.
Example: in /home/jpr/ i have the following list of directories.
1.2.3-2, 1.2.3-10, 1.2.3-8, i would like to delete the directories other
than 1.2.3-10 which is the higher value?..
Regards,
It'd be great if all programs used the same encoding on a given OS,
but at least on Linux, I believe historically filenames have been
created with different encodings. IOW, if I pick one encoding and go
with it, filenames written in some other encoding are likely to cause
problems. So I
The world does not revolve around Python. Unix filenames have been
encoding-agnostic long before Python was around. If Python3 does not
support this then it's a regression on Python's part.
Fortunately, Python 3 does support that.
Regards,
Martin
--
This sounds like a strong prospect for how to get things working (I
didn't realize open would accept a bytes argument for the filename),
but I'm also interested in whether reading filenames from stdin and
subsequently opening them is supposed to just work given a suitable
encoding - like with
http://www.telegraph.co.uk/news/worldnews/northamerica/usa/8152326/WikiLeaks-release-Timeline-of-the-key-WikiLeaks-revelations.html
WikiLeaks release: Timeline of the key WikiLeaks revelations
By Jon Swaine in New York 6:53PM GMT 22 Nov 2010
December 2007: Guantanamo Bay operating procedures
goldtech, 30.11.2010 22:15:
Think I found it, for example:
line = 'my big string'
line.encode('ascii', 'ignore')
I processed the problem strings during parsing with this and it works
now.
That's not the right way of dealing with encodings, though. You should open
the file with a well
Mark Dickinson dicki...@gmail.com added the comment:
Grr. Why wasn't this fix backported to the release maintenance branch before
2.6.6 was released? I've just had an application break as a result of
upgrading from 2.6.5 to 2.6.6.
Oh well, too late now. :-(
/grumble
--
nosy:
Senthil Kumaran orsent...@gmail.com added the comment:
Ouch. My mistake. Had not realize then, that code that actually broke things
was merged in 2.6.x and it had to be fixed too. :(
--
___
Python tracker rep...@bugs.python.org
Mark Dickinson dicki...@gmail.com added the comment:
Ah well, it turned out to be fairly easy to work around, at least. :-)
Just in case any other urllib2 users have to deal with this in 2.6.6 (and also
manage to find their way to this bug report :-): it's easy to monkeypatch your
way around
New submission from Emile Anclin emile.anc...@logilab.fr:
Considering following file:
$ cat pylint/test/input/func_unknown_encoding.py
# -*- coding: IBO-8859-1 -*-
check correct unknown encoding declaration
__revision__ = ''
$
When we try to find that module, imp.find_module raises
Stefan Krah stefan-use...@bytereef.org added the comment:
Without the patch, you see the warning if test_build_ext is run in
verbose mode. With the patch, the warning disappears.
--
___
Python tracker rep...@bugs.python.org
Xuanji Li xua...@gmail.com added the comment:
pitrou: actually that seems a bit suspect now... you need to handle 'data'
differently depending on its type, and while you can determine the type by
finding out when 'data' throws certain exceptions, it doesn't seem like what
exceptions were
Ned Deily n...@acm.org added the comment:
More data points: using the 2.7.1 release source tarball, the problem is
reproducible on 10.6 when dynamically linked to the Apple Tcl/Tk 8.5 and
executing in either 64-bit or 32-bit mode. It is not reproducible when using
ActiveState Tcl/Tk 8.5.9,
Xuanji Li xua...@gmail.com added the comment:
bumping...can someone review this? The reported bug seems valid enough.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10464
___
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Hi, as I stated, the original patch was simply our original implementation.
Here is a new patch. It is simpler:
1) it exposes a gc.callbacks list where users can register themselves, in the
spirit of sys.meta_path
2) One can have
Antoine Pitrou pit...@free.fr added the comment:
Let's start bikeshedding the calling signature. I like having a
single callback, since multiple callables are a nuisance to manage.
IMO the callback should have a second argument as a dict containing
various statistics that we can expand over
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
You are right, Antoine.
How about a string and a dict? the string can be start and stop and we can
add interesting information to the dict as you suggest.
--
___
Python tracker
Antoine Pitrou pit...@free.fr added the comment:
pitrou: actually that seems a bit suspect now... you need to handle
'data' differently depending on its type,
Yes, but you can't know all appropriate types in advance, so it's better
to try and catch the TypeError.
I don't understand your
Xuanji Li xua...@gmail.com added the comment:
I don't fully understand Lib/urllib/request.py either, I just ported it and ran
the unittests... it seems like what it does is that if you send an iterator
through as 'data' you can't know the length in advance, and rather than let the
len(data)
Changes by Ron Adam ron_a...@users.sourceforge.net:
--
nosy: +ron_adam
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10588
___
___
Davide Rizzo sor...@gmail.com added the comment:
len(data) will raise anyway.
No, it won't, if the iterable happens to be a sequence.
--
nosy: +davide.rizzo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3243
Antoine Pitrou pit...@free.fr added the comment:
len(data) will raise anyway.
No, it won't, if the iterable happens to be a sequence.
Well, it seems the patch is confused between iterable and iterator. Only
iterators have a __next__, but they usually don't have a __len__.
The patch should
Nick Coghlan ncogh...@gmail.com added the comment:
Committed in r86889
The docs changes should soon be live at:
http://docs.python.org/dev/library/urllib.parse.html
If anyone would like to suggest changes to the wording of the docs for post
beta1, or finds additional corner cases that the new
1 - 100 of 186 matches
Mail list logo