R. David Murray rdmur...@bitdance.com added the comment:
strip removes any of a set of characters from the beginning and end of a
string, not the middle.
Please refer questions such as this to python-list or python-tutor.
There are many helpful people on those lists who will help you learn
Eric Smith e...@trueblade.com added the comment:
Good advice from R. David. In addition, you'll find the help command useful:
help(''.strip)
Help on built-in function strip:
strip(...)
S.strip([chars]) - string or unicode
Return a copy of the string S with leading and trailing
R. David Murray rdmur...@bitdance.com added the comment:
The only way I can think of to fix this that won't fail in the case
where the body ends with just '\r' (rather than '\r\n' the way the test
body does) is to have feedparser keep track of what the overall line
endings for the stream being
STINNER Victor victor.stin...@haypocalc.com added the comment:
The error occurs in Py_Main(), on _PyUnicode_AsString(commandObj). The
problem is that _PyUnicode_AsString() is not checked for error. Here is
a patch fixing two errors:
- display on error message instead of a crash on
STINNER Victor victor.stin...@haypocalc.com added the comment:
First, gzip should use its own errors: this issue depends on #6584.
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6669
R. David Murray rdmur...@bitdance.com added the comment:
Since 6584 is deemed (correctly, IMO) a feature request, this one must
be as well.
--
dependencies: +gzip module has no custom exception
keywords: +easy
nosy: +r.david.murray
priority: - normal
stage: - test needed
type:
New submission from Giampaolo Rodola' billiej...@users.sourceforge.net:
An old bad design choice in asyncore is how it forces the user to
override handle_accept() and then call self.accept() to obtain a socket
pair.
def handle_accept(self):
conn, addr = self.accept()
The
New submission from Dino Viehland di...@microsoft.com:
from types import ModuleType as M
m = M.__new__(M)
dir(m)
In 2.5 this raises an exception about not having __dict__, 2.6.2
crashes out right.
--
components: Interpreter Core
messages: 91580
nosy: DinoV
severity: normal
status:
STINNER Victor victor.stin...@haypocalc.com added the comment:
I agree that the C type 'char' is a byte, not a character. So Python3
should creates a Python bytes object for the ctypes c_char_p type.
Since Python 3.1 is out, is it too late to change it in the 3.x branch?
:-) Maybe for Python
Nick Coghlan ncogh...@gmail.com added the comment:
Reopening - this should be rejected by the compiler as a SyntaxError,
since it is the comprehension equivalent of writing return Value
inside a generator function.
Specifically, in 3.x, the equivalent written out code is:
while True:
Jacob Rus jacobo...@gmail.com added the comment:
Okay, here's a version of this patch which (a) adds deprecation warnings,
and (b) doesn't bother with lazy init. It should still be nearly
completely backwards compatible with the previous mimetypes module.
--
Added file:
New submission from starz b_lyn...@yahoo.com:
# -- SOURCE ---
# cheerleading program
word = raw_input(Who do you go for? )
for letter in word:
call = Gimme a + letter + !
print (call)
print (letter) + !
print( What does that spell?)
print( word + !)
# --- end source
Jacob Rus jacobo...@gmail.com added the comment:
And at Rietveld, patch version 5:
http://codereview.appspot.com/107042
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6626
___
Skip Montanaro s...@pobox.com added the comment:
Try it at the help prompt without the parens (you're not calling
it here, just asking for the documentation on the name raw_input.
help raw_input
Help on built-in function raw_input in module __builtin__:
raw_input(...)
raw_input([prompt])
Benjamin Peterson benja...@python.org added the comment:
raw_input() has been renamed to input() in Python 3.
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6708
Changes by Benjamin Peterson benja...@python.org:
--
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6709
___
___
Python-bugs-list
Terry J. Reedy tjre...@udel.edu added the comment:
If a change is make, 'remove (delete)' would be sufficient.
--
nosy: +tjreedy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6677
___
New submission from Benjamin Peterson benja...@python.org:
I think we might need to devise some way to add custom validation when
AST is being compiled. For example, you can also pass a level to
ImportFrom which is -1.
x = ast.parse(try: x\nexcept y: pass)
del x.body[0].handlers[:]
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
I concur with Martin's reasons for closing the patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1660179
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
I concur with Martin's reasons for closing the patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1660179
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Does anyone here know why GC calls the free_xxx functions? ISTM, they
cannot be involved in cycles. Free lists are kept by container objects
to speed-up allocation. Having GC call the free_xxx just slows down the
GC process
Gregory P. Smith g...@krypto.org added the comment:
Note that http://bugs.python.org/issue4879 may have already fixed this
problem in trunk r68532.
--
nosy: +gregory.p.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2576
201 - 222 of 222 matches
Mail list logo