New submission from patrick vrijlandt :
This causes a crash in python 3.2.2 and 3.2, but not in 2.7.2
C:\Python32>python
Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license"
patrick vrijlandt added the comment:
Is it relevant that 2.7.2 _does_ throw a correct exception?
--
___
Python tracker
<http://bugs.python.org/issue13
patrick vrijlandt added the comment:
Somewhere in the code is also/still a seperate check concerning strftime:
PythonWin 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on
win32.
Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' for
further
New submission from patrick vrijlandt :
>From the python docs for version 3.2:
19.12.3. ElementTree Objects
find(match)
[...] Same as getroot().find(match). [...]
This is not true: tree.find accepts an absolute path (like "/*") , whereas
element.find doesn't. Also appl
New submission from patrick vrijlandt :
Python 3.2 supports ElementPath version 1.3. The relevant documentation is
http://effbot.org/zone/element-xpath.htm. It says:
.. (New in 1.3) Selects the parent element.
However, a CHANGES document says:
The engine also provides limited support for
New submission from patrick vrijlandt :
>From http://effbot.org/zone/element-xpath.htm:
[position] (New in 1.3) Selects all elements that are located at the given
position. The position can be either an integer (1 is the first position), the
expression “last()” (for the last posit
patrick vrijlandt added the comment:
[...] Same as getroot().find(match). [...] ->
[...] For a relative path, this is equivalent to getroot().find(match).
Additionally, this form accepts an absolute path. [...]
This is easy, but might not be a very good solution.
Random thoughts/Points
New submission from patrick vrijlandt :
Line 154 in standard library's queue.py, in the definition of Queue.put() is:
self.unfinished_tasks += 1
This line should be protected by acquiring the all_tasks_done lock.
Theoretically, the increment could occur somewhere during task
patrick vrijlandt added the comment:
I agree. Please close the ticket.
Thanks,
Patrick
2011/5/3 Raymond Hettinger
>
> Raymond Hettinger added the comment:
>
> > This line should be protected by acquiring the all_tasks_done lock.
>
> All of three of the condition var
New submission from patrick vrijlandt :
PythonWin 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on
win32.
Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' for
further copyright information.
>>> import os
>>> os.makedirs(&
New submission from patrick vrijlandt :
Problem:
Locator methods return the location where the event starts, not where it ends.
Locator line numbers start at 1, Locator column numbers can be 0.
Proposal:
Adapt documentation.
>From the docs:
Instances of Locator provide these meth
patrick vrijlandt added the comment:
I agree the Element syntax is sometimes awkward.
But how would you represent text or tail attributes within this enhanced
element?
comes to mind ...
--
nosy: +patrick.vrijlandt
___
Python tracker
<h
patrick vrijlandt added the comment:
The documentation of this function is generally ambiguous, because os.walk is a
generator. Thus "generate" means (1) yielded from a generator and (2) prepared
for later use within the generator. To avoid the ambiguity, "generate" s
patrick vrijlandt added the comment:
Hi,
Did you look at lxml (http://lxml.de)?
from lxml.builder import E
from lxml import etree
tree = etree.ElementTree(
E.Hello(
"Good morning!",
E.World("How do you do", humour = "excellent"),
New submission from patrick vrijlandt :
(1) The docs say:
xml_declaration controls if an XML declaration should be added to the file. Use
False for never, True for always, None for only if not US-ASCII or UTF-8 or
Unicode (default is None).
The method also accepts other values, like
patrick vrijlandt added the comment:
Good solution. +1 for closing.
Patrick
--
___
Python tracker
<http://bugs.python.org/issue13779>
___
___
Python-bugs-list m
New submission from patrick vrijlandt:
.mht is an archive format created by Microsoft IE 8 when saving a webpage. It
is essentially a mime multipart message.
My problem occurred when I uploaded such a file to a cgi-based server. The
posted data would be fed to cgi.FieldStorage. (I can't
New submission from patrick vrijlandt:
quopri.py's functions encodestring and decodestring are documented to handle
strings; and this is clearly suggested by their name. However, these functions
accept and return bytes, not strings. This should be reflected in the
documentation.
Even b
patrick vrijlandt added the comment:
I would not know how to set the MIME-type of a file during upload. This is
apparently set by the browser based on the filename (extension). Even (or:
especially) if this is a bug in all the current browsers, python should provide
the tools to adapt to this
patrick vrijlandt added the comment:
I must admit my usage case is a hack, but the summary is: view a page on one
computer, process it on another computer; like sending the page to a friend,
with friend -> self and send -> upload.
I found one other victim in python
(https://groups.goog
patrick vrijlandt added the comment:
To be complete: an xpath 'above' the start element returns None
Thanks for the patch!
--
___
Python tracker
<http://bugs.python.o
patrick vrijlandt added the comment:
Dear Eli,
According to the XPath spec, the 'position' as can be used in xpath
expressions, should be positive. However, the current implementation (example
below from 3.3.0) accepts some values that should not be ok.
Therefore, I do not agr
22 matches
Mail list logo