New submission from Alexey Shamrin :
There are many libraries in Python stdlib [1]
xml.dom
xml.dom.minidom
xml.dom.pulldom
xml.sax
xml.etree
Tutorial mentions xml.dom and xml.sax. [2]
In my experience xml.etree is the best library to quickly load some xml and
mess with it. It would be nice
New submission from Alexey Shamrin <[EMAIL PROTECTED]>:
In the process of trying to use optparse with russian messages, I found
several problems with gettext and unicode handling:
1. optparse.OptionParser.error function doesn't work with unicode argument
2. optparse doesn't wor
Alexey Shamrin <[EMAIL PROTECTED]> added the comment:
I've also attached a patch that fixes all these issues and also allows
the word "error" to be translated with gettext.
Regarding the use of `locale.getpreferredencoding` instead of
`sys.getdefaultencoding`. On my system
Alexey Shamrin <[EMAIL PROTECTED]> added the comment:
sampablokuper, I don't think your problem is relevant to this issue. In
addition to encoding declaration you should use unicode strings: u"your
non-ASCII text". Or wait for Python 3.0, where strings will
Alexey Shamrin added the comment:
More than a year passed since I reported this... Could someone suggest
how to move this forward? If needed, I can try to improve patch, test or
description of this issue. Should I, for example, split this into
separate issues
Alexey Shamrin added the comment:
Good suggestions, Mark! We should do both, I think. I didn't know about
sys.byteorder before your message ;-) Thanks for education!
How about this:
"Native byte order is big-endian or little-endian, depending on the host
system. For example, Int
Alexey Shamrin added the comment:
Little style:
"Native byte order is big-endian or little-endian, depending on the host
system. For example, Intel x86 and AMD64 (x86-64) are little-endian;
Motorola 68000 and PowerPC G5 are big-endian; ARM and DEC Alpha feature
switchable endiannes
Changes by Alexey Shamrin :
--
versions: +Python 2.7
___
Python tracker
<http://bugs.python.org/issue2931>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexey Shamrin added the comment:
There's nothing to fix here, I think... There's no point in allowing
arbitrary byte strings in help strings. Especially because Python 3
features unicode strings by default.
IMHO, this issue should be closed. And see also #2931 for remaining i18n
pro
New submission from Alexey Shamrin :
Typo in PyObject_GetBuffer docs: "...handle all the complexibity..."
Links:
http://docs.python.org/c-api/buffer.html#buffer-related-functions
http://docs.python.org/dev/c-api/buffer.html#buffer-related-functions
http://docs.python.org/3.1/c-api/b
Alexey Shamrin added the comment:
Well, there's another typo in buffer documentation (PyBuffer_Release):
"This shouldd be called..."
Only in 2.x series:
http://docs.python.org/c-api/buffer.html#PyBuffer_Release
http://docs.python.org/dev/c-api/buffer.html#P
New submission from Alexey Shamrin :
"A memoryview object is an extended buffer object that could replace the
buffer object (but doesn’t have to as that could be kept as a simple 1-d
memoryview object)."
Well, buffer object was dropped Python 3, wasn't it?
http://docs.python.org
Alexey Shamrin added the comment:
Antoine, it seems, this sentence was taken literally from PEP3118
(http://www.python.org/dev/peps/pep-3118/#new-c-api-calls-are-proposed).
PEP authors discussed if __builtins__.buffer should be removed.
I agree, old __builtins__.buffer should not be mentioned
Alexey Shamrin added the comment:
You've made three groups with parentheses. Just drop them:
>>> re.findall('-?\d+[.]\d+|-?\d+[.]?|-?[.]\d+', 'asdf6.77.33ff9')
['6.7', '7.33', '9']
Everything is according to documentation:
Alexey Shamrin added the comment:
I've added Tim Peters to the nosy list. Is there anyone else who should
be considered as doctest maintainer? I've also checked further Python
versions - a quick a look at latest doctest source shows that the
problem is still there.
There are some de
Alexey Shamrin added the comment:
Georg, it would also be nice to give a link to 'surrogateescape'
information in os module [1]. Yes, you gave a link to PEP 383, but PEP
harder to follow and more lengthy.
[1]:
http://docs.python.org/3.1/library/os.html#file-names-command-line-arg
New submission from Alexey Shamrin :
Maybe it's just me, but it took me several attempts to understand
namedtuple example in the documentation [1]. The problem is that the
first example uses verbose=True. It's very unusual to get Python source
as the output in Python shell. At first
Alexey Shamrin added the comment:
Raymond, sorry if I wasn't clear. I'm fine with the API (haven't used it
yet though, because I was stuck after skimming through its documentation).
I suggest to make *first* example simple (without verbose=True) and to
move an example with verb
Alexey Shamrin added the comment:
Roundup broke formatting... I've attached a text file with the proposed
example.
--
Added file: http://bugs.python.org/file14747/namedtuple_doc_example.txt
___
Python tracker
<http://bugs.python.org/i
19 matches
Mail list logo