Re: collections.Iterator __subclasshook__ does not check if next() is callable

2013-03-31 Thread Byron Ruth
assumptions. On Sunday, March 31, 2013 3:47:07 PM UTC-4, Terry Jan Reedy wrote: > On 3/31/2013 1:57 PM, Byron Ruth wrote: > > > I submitted this as bug last night: http://bugs.python.org/issue17584 and > > was *honored* to be rejected by Raymond Hettinger. However, I would like > >

Re: collections.Iterator __subclasshook__ does not check if next() is callable

2013-03-31 Thread Byron Ruth
Raymond's replied to my follow-up and made me realize that the `next` property could return a callable and it would be transparent to the caller. On Sunday, March 31, 2013 1:57:08 PM UTC-4, Byron Ruth wrote: > I submitted this as bug last night: http://bugs.python.org/issue17584

collections.Iterator __subclasshook__ does not check if next() is callable

2013-03-31 Thread Byron Ruth
I submitted this as bug last night: http://bugs.python.org/issue17584 and was *honored* to be rejected by Raymond Hettinger. However, I would like feedback on whether my concern (this bug) is justified and clarity if not. Consider: ```python class A(object): def __init__(self): self

Re: lxml: traverse xml tree and retrieve element based on an attribute

2009-05-21 Thread byron
On May 21, 8:27 pm, MRAB wrote: > byron wrote: > > [snip] > > > Thanks. Yes i tried something like this, but I think I overwrite `c` > > when i wrote it, as in: > > >     if len(c) > 0: > >         c = fin_node(c, name) > >         if c is not No

Re: lxml: traverse xml tree and retrieve element based on an attribute

2009-05-21 Thread byron
On May 21, 6:57 pm, MRAB wrote: > byron wrote: > > I am using the lxml.etree library to validate an xml instance file > > with a specified schema that contains the data types of each element. > > This is some of the internals of a function that extracts the > > element

lxml: traverse xml tree and retrieve element based on an attribute

2009-05-21 Thread byron
I am using the lxml.etree library to validate an xml instance file with a specified schema that contains the data types of each element. This is some of the internals of a function that extracts the elements: schema_doc = etree.parse(schema_fn) schema = etree.XMLSchema(schema_doc)

Re: book example confusion

2008-09-12 Thread byron
On Sep 12, 3:51 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Sep 13, 5:36 am, byron <[EMAIL PROTECTED]> wrote: > > > > > I am reading o'reilly's learning python (great book), but i came > > across an example (pg 291, pdf) that I am not quite un

book example confusion

2008-09-12 Thread byron
I am reading o'reilly's learning python (great book), but i came across an example (pg 291, pdf) that I am not quite understanding the reasoning for the author's explanation: if f1() or f2(): The author states that do to the nature of that expression, if f1() returns True, f2() will not be evalua

Python doc problem example: gzip module (reprise)

2008-06-21 Thread Byron Rios
>>> fileToCompress = open('finalcallejon.mb') >>> fileToStr = fileToCompress.read() >>> import gzip >>> fileZipped = gzip.GzipFile('finalcallejon.mb.gz', 'wb', 9) >>> fileZipped.write(fileToStr) >>> fileZipped.close() this may help you in http://mail.python.org/pipermail/python-list/2005-November

Maven like tool?

2004-12-18 Thread Byron Saltysiak
nt the wheel if something is already out there then I'd rather be a user for this one than the developer. Thanks in advance. Byron Saltysiak -- http://mail.python.org/mailman/listinfo/python-list

Re: comment out more than 1 line at once?

2004-11-30 Thread Byron
Marc Boeren wrote: Well, you could fake it by doing """ block of code here is commented out """ """ Yes, this is generally how it is done in python. """ Byron --- -- http://mail.python.org/mailman/listinfo/python-list