[issue15873] "datetime" cannot parse ISO 8601 dates and times

2012-11-01 Thread kirpit

Changes by kirpit :


--
nosy: +kirpit

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



[issue16044] xml.etree.ElementTree.Element: append method iterator param is broken

2012-09-25 Thread kirpit

kirpit added the comment:

well, i've just followed the source code regardless to documentation so you may 
be right about appending a single element. (kind of newbie around here.)

but then, append method is misbehaving about asserting the parameter, isn't it?

--

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



[issue16044] xml.etree.ElementTree.Element: append method iterator param is broken

2012-09-25 Thread kirpit

New submission from kirpit:

xml.etree.ElementTree.Element's append method doesn't support iterator/sequence 
parameters as it's supposed to, for the version 1.3.0.

Python 2.7.3 (default, Sep 14 2012, 09:52:31) 
[GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.60))] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import xml.etree.ElementTree as et
>>> et.VERSION
'1.3.0'
>>> root = et.Element('root')
>>> sublist = [et.Element('sub'), et.Element('sub')]
>>> root.append(sublist)
>>> et.tostring(root)
Traceback (most recent call last):
  File "", line 1, in 
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py",
 line 1127, in tostring
ElementTree(element).write(file, encoding, method=method)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py",
 line 818, in write
self._root, encoding, default_namespace
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py",
 line 878, in _namespaces
for elem in iterate():
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py",
 line 477, in iter
for e in e.iter(tag):
AttributeError: 'list' object has no attribute 'iter'

>>> root = et.Element('root')
>>> root.append(iter(sublist))
>>> et.tostring(root)
Traceback (most recent call last):
  File "", line 1, in 
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py",
 line 1127, in tostring
ElementTree(element).write(file, encoding, method=method)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py",
 line 818, in write
self._root, encoding, default_namespace
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py",
 line 878, in _namespaces
for elem in iterate():
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py",
 line 477, in iter
for e in e.iter(tag):
AttributeError: 'listiterator' object has no attribute 'iter'

--
assignee: ronaldoussoren
components: Macintosh, XML
messages: 171255
nosy: kirpit, ronaldoussoren
priority: normal
severity: normal
status: open
title: xml.etree.ElementTree.Element: append method iterator param is broken
type: behavior
versions: Python 2.7

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