C", agree or disagree? (four word maximum)
Agree. Readable interface-based callbacks. (Is that 4 or 5 words?)
>
> Bonus: A rabbi walks into a bar while nursing a baby goat. He is
> closely followed by a priest, and a Perl hacker. Explain.
try:
pass
--
Regards,
Tijs
--
http://mail.python.org/mailman/listinfo/python-list
okup how to use it is larger than the time to implement the specialized
version for the task at hand.
--
Regards,
Tijs
--
http://mail.python.org/mailman/listinfo/python-list
assumption even in a
> dynamic language like Python.
No, x may be an object that has the __mul__ special method, and it may have
side effects.
--
Regards,
Tijs
--
http://mail.python.org/mailman/listinfo/python-list
gle one that takes a wide range of construction possibilities,
like strings, lambdas or regexes in various keyword parameters.
BlockReader(f, start='>')
BlockReader(f, start=re.compile('>|<'), end='---')
BlockReader(f, start=lambda x: x.startswith(
;')
for block in b:
# whatever
--
Regards,
Tijs
--
http://mail.python.org/mailman/listinfo/python-list
st
I think this must be an issue with roundup, issuing commands in the wrong
order. The correct order should (according to the rfc and the python docs)
be:
* ehlo()
* starttls()
* ehlo()
* login()
...
--
Regards,
Tijs
--
http://mail.python.org/mailman/listinfo/python-list
print lines
> print
> name=line.stripr('\r')
> lines=[]
> else:
> lines.append(line.stripr('\n'))
>
That would miss the last chunk.
--
Regards,
Tijs
--
http://mail.python.org/mailman/listinfo/python-list
tringIO
s = \
"""> name1
line1
line2
line3
> name2
line 4
line 5
line 6"""
f = StringIO(s)
for name, lines in chunkreader(f):
print '***', name
print ''.join(lines)
$ python test.py
*** name1
line1
line2
line3
*** name2
line 4
line 5
line 6
--
Regards,
Tijs
--
http://mail.python.org/mailman/listinfo/python-list
ge, in which case you have no way of knowing.
--
Regards,
Tijs
--
http://mail.python.org/mailman/listinfo/python-list
for i in c] # too long and ...huh?
> a
> b
> [None,None]
> #--
>
[None, None] is the result of the operation.
for i in c: i()
If that is too long, reconsider what you are doing.
--
Regards,
Tijs
--
http://mail.python.org/mailman/listinfo/python-list
g your SIGINT signal
handler. Python installs an OS-level signal handler that raises the
KeyboardInterrupt in the main thread. If a library installs its own
handler, Python won't catch it.
--
Regards,
Tijs
--
http://mail.python.org/mailman/listinfo/python-list
Ruben
The 'raise' in line 1271 re-raises the last error instead of the exception
in whose block it is called.
This:
try:
raise KeyError
except:
try:
raise IndexError
except: pass
raise
raises IndexError, not KeyError.
--
Regards,
Tijs
--
http://mail.python.org/mailman/listinfo/python-list
ode, best to keep all text in unicode.
--
Regards,
Tijs
--
http://mail.python.org/mailman/listinfo/python-list
nection after
having sent the response. Why the difference? Don't know, but it is
something server-side.
Try to force the server to send HTTP/1.0 responses, or turn off keep-alive,
or something like that. Otherwise, adapt xmlrpclib.py to robustly handle
1.1 responses.
--
Regards,
Tijs
--
http://mail.python.org/mailman/listinfo/python-list
bles of other modules
are properties of the module, use ..
>
> Also, functions in this file and in the imported parent class need
> PyHttpTestCase. Does there need to be an import statement in both
> files?
Yes. Don't worry, the work is done only once.
Regards,
Tijs
--
http://mail.python.org/mailman/listinfo/python-list
ur application handles text, it may be easier to just leave everything
in Unicode and encode to utf-8 for storage?
Regards,
Tijs
--
http://mail.python.org/mailman/listinfo/python-list
16 matches
Mail list logo