[issue17069] HTTP result code in urllib2.urlopen() file object undocumented

2013-01-29 Thread Tuure Laurinolli

New submission from Tuure Laurinolli:

As per documentation at http://docs.python.org/2/library/urllib2.html the 
file-like object returned by urllib2.urlopen() should have methods geturl() and 
info(). It actually also has getcode(), which appears to do the same as 
getcode() on urllib.urlopen() responses.

This should be a documented feature of urllib2.

--
components: Library (Lib)
messages: 180900
nosy: tazle
priority: normal
severity: normal
status: open
title: HTTP result code in urllib2.urlopen() file object undocumented
versions: Python 2.6, Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17069
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3138] Hang when calling get() on an empty queue in the queue module

2009-03-27 Thread Tuure Laurinolli

Tuure Laurinolli tu...@laurinolli.net added the comment:

Is it also intended that Queue.get() eats SIGINTs, requiring one to kill
the process with something heavier?

--
nosy: +tazle

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3138
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



New-style classes, iter and PySequence_Check

2005-04-14 Thread Tuure Laurinolli
Someone pasted the original version of the following code snippet on 
#python today. I started investigating why the new-style class didn't 
work as expected, and found that at least some instances of new-style 
classes apparently don't return true for PyInstance_Check, which causes 
a problem in PySequence_Check, since it will only do an attribute lookup 
 for instances.

Things probably shouldn't be this way. Should I go to python-dev with this?
Demonstration snippet:
args={'a':0}
class Args(object):
def __getattr__(self,attr):
print __getattr__:, attr
return getattr(args,attr)
class ClassicArgs:
def __getattr__(self, attr):
print __getattr__:, attr
return getattr(args, attr)
if __name__ == '__main__':
c = ClassicArgs()
i = c.__iter__()
print i
i = iter(c)
print i
a = Args()
i = a.__iter__()
print i
i = iter(a)
print i
--
http://mail.python.org/mailman/listinfo/python-list