Re: [Python-Dev] Draft PEP for time zone support.

2012-12-11 Thread Robert Brewer
, 11, 4) - datetime.date(2012, 3, 11) datetime.timedelta(238) datetime.date(2013, 3, 10) - datetime.date(2012, 11, 4) datetime.timedelta(126) Robert Brewer fuman...@aminus.org ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org

Re: [Python-Dev] Maintenance burden of str.swapcase

2011-09-12 Thread Robert Brewer
it doesn't work for WWW-Authenticate or TE, to give just a couple of examples. Robert Brewer fuman...@aminus.org ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org

Re: [Python-Dev] PEP 3333: wsgi_string() function

2011-01-07 Thread Robert Brewer
P.J. Eby wrote: At 09:43 AM 1/7/2011 -0500, James Y Knight wrote: On Jan 7, 2011, at 6:51 AM, Victor Stinner wrote: I don't understand why you are attached to this horrible hack (bytes-in-unicode). It introduces more work and more confusing than using raw bytes unchanged. It

Re: [Python-Dev] PEP 3333: wsgi_string() function

2011-01-07 Thread Robert Brewer
Paul Moore wrote: Robert Brewer fuman...@aminus.org wrote: P.J. Eby wrote: Also, it should be mentioned that none of this would be necessary if we could've gotten a bytes of a known encoding type. Still looking forward to the day when that moratorium is lifted. Anyone have any

Re: [Python-Dev] Proposal: make float.__str__ identical tofloat__repr__ in Python 3.2

2010-07-29 Thread Robert Brewer
a number of tools in the past that needed to round-trip a float through a string and back. I was under the impression that floats needed 17 decimal digits to avoid losing precision. How does one do that efficiently if neither str nor repr return 17 digits? Robert Brewer fuman...@aminus.org

Re: [Python-Dev] web apps in python 3

2009-08-31 Thread Robert Brewer
Chris Withers wrote: Robert Brewer wrote: you could switch to Python 3.1, I would love to, once Python 3 has a viable web app story... CherryPy 3.2 is now in beta, and mod_wsgi is nearly ready as well. Both support Python 3. :) My understanding was that the wsgi spec for Python 3 wasn't

Re: [Python-Dev] [Web-SIG] py3k, cgi, email, and form-data

2009-05-12 Thread Robert Brewer
Graham Dumpleton wrote: 2009/5/12 Robert Brewer fuman...@aminus.org: There's a major change in functionality in the cgi module between Python 2 and Python 3 which I've just run across: the behavior of FieldStorage.read_multi, specifically when an HTTP app accepts a file upload within

[Python-Dev] py3k, cgi, email, and form-data

2009-05-11 Thread Robert Brewer
incremental writes, but I haven't yet found a way to do any kind of incremental reads from it in order to shunt the fp.read out to a tempfile again. I'm secretly hoping Barry has a one-liner fix for this. ;) Robert Brewer fuman...@aminus.org ___ Python-Dev

[Python-Dev] py3k, cgi, and form-data

2009-05-11 Thread Robert Brewer
incremental writes, but I haven't yet found a way to do any kind of incremental reads from it in order to shunt the fp.read out to a tempfile again. I'm secretly hoping Barry has a one-liner fix for this. ;) Robert Brewer fuman...@aminus.org ___ Python-Dev

Re: [Python-Dev] RFC: Threading-Aware Profiler for Python

2009-05-04 Thread Robert Brewer
is to compare runs on various platforms. And please, stop perpetuating the myth that only end-users use anything but Linux. Robert Brewer fuman...@aminus.org ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo

Re: [Python-Dev] Dropping bytes support in json

2009-04-10 Thread Robert Brewer
). If not, Message.header_encoding should be sufficient. Robert Brewer fuman...@aminus.org ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python

Re: [Python-Dev] http://bugs.python.org/issue3628

2009-01-09 Thread Robert Brewer
don't know enough about the tracker to find if it was fixed in 2.6 concurrently, but the symptom appears there. I tried hacking all the references I could find to XXX.SetDaemon(True) to XXX.daemon = True but it didn't seem to help. Fixed in http://www.cherrypy.org/changeset/2096. Robert Brewer

Re: [Python-Dev] subprocess insufficiently platform-independent?

2008-08-25 Thread Robert Brewer
sys.platform and set shell=True for Windows. Robert Brewer [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail

Re: [Python-Dev] A proposed solution for Issue 502236: Asyncrhonousexceptions between threads

2008-07-12 Thread Robert Brewer
to stop. Robert Brewer [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] urllib unicode handling

2008-05-07 Thread Robert Brewer
, it's pretty simple: u'www.\u212bngstr\xf6m.com'.encode(idna) 'www.xn--ngstrm-hua5l.com' Robert Brewer [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] sock.close() not closing?

2008-05-07 Thread Robert Brewer
you aren't--trust me, I understand reference counting). Even if you're fully aware of all references, it's indeterminate in multithreaded apps. I've just taken to doing: self.socket._sock.close() self.socket.close() ...in order to send the FIN I wanted ASAP. Robert Brewer [EMAIL

Re: [Python-Dev] PEP 8: Discourage named lambdas?

2008-05-03 Thread Robert Brewer
' instead of 'lambda' we wouldn't be having this discussion. Robert Brewer [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python

Re: [Python-Dev] Wow, I think I actually *get* it now!

2008-03-20 Thread Robert Brewer
. Robert Brewer [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] PEP 365 (Adding the pkg_resources module)

2008-03-20 Thread Robert Brewer
%+ are never installed or even built--I just want to grep the source code, and using my preferred tools, not some lame Find command in a ZIP browser menu. Robert Brewer [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] PEP 365 (Adding the pkg_resources module)

2008-03-20 Thread Robert Brewer
users despise it. If you're installing apps all day, you probably use it a lot more often than library devs like me who use it once every other month (if we're forced to). Robert Brewer [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] The Breaking of distutils and PyPI for Python 3000?

2008-03-19 Thread Robert Brewer
all the time as I code? not to mention litter my codebase with # the following ugly hack lets us work with Python 2 and 3 comments so someone else doesn't undo all my hard work when they run the tests on Python 3 but not 2? No thanks. My brain is too small. Robert Brewer [EMAIL PROTECTED

Re: [Python-Dev] Backporting PEP 3127 to trunk

2008-02-22 Thread Robert Brewer
that we don't need oct() at all. IIRC, unix permissions like 0666 were the only use case that surfaced. Postgres bytea coercion is a frequent use case for oct() in my world. But I agree we don't need two versions. Robert Brewer [EMAIL PROTECTED

Re: [Python-Dev] Backporting PEP 3127 to trunk

2008-02-22 Thread Robert Brewer
Eric Smith wrote: Robert Brewer wrote: Raymond Hettinger wrote: I thought the whole point of 3.0 was a recognition that all that doubling-up was a bad thing and to be rid of it. Why make the situation worse? ISTM that we need two versions of oct() like we need a hole in the head

Re: [Python-Dev] Monkeypatching idioms -- elegant or ugly?

2008-01-15 Thread Robert Brewer
monkeypatch repeatedly on the same cls.method (but it's not thread-safe). And although it might seem to be making monkeypatches easier to perform, at least it's very explicit about what's going on as long as you keep monkeypatch in the name. Robert Brewer [EMAIL PROTECTED

Re: [Python-Dev] context manager - generator interaction?

2007-04-05 Thread Robert Brewer
. Can we get that into the Language Ref somewhere? Maybe on the http://docs.python.org/ref/try.html page? Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman

Re: [Python-Dev] I vote to reject: Adding timeout tosocket.pyand httplib.py.

2007-03-21 Thread Robert Brewer
in that case? I've found missing to be the most common (and the most understandable) thing to print in that case. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org

Re: [Python-Dev] datetime module enhancements

2007-03-11 Thread Robert Brewer
Jon Ribbens wrote: Robert Brewer [EMAIL PROTECTED] wrote: One solution that just occurred to me -- and that skirts the issue of choosing an interpretation -- is that, when comparing date and datetime objects, the datetime's .date() method is called and the result of that call

Re: [Python-Dev] datetime module enhancements

2007-03-10 Thread Robert Brewer
-made use case for that method. +1 ...and it's a decision that can be made independently of how to add or subtract dates. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] datetime module enhancements

2007-03-09 Thread Robert Brewer
. Is an implicit time of 0 really so surprising? It doesn't seem to be surprising for the datetime constructor: datetime.datetime(2007, 3, 9) datetime.datetime(2007, 3, 9, 0, 0) Why should it be surprising for comparisons? Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED

Re: [Python-Dev] pysqlite for 2.5?

2006-03-29 Thread Robert Brewer
to SQLite's exposed multiple-readers/one-writer design) on a daily basis (FAQ entries notwithstanding). Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo

Re: [Python-Dev] conditional expressions - add parens?

2006-03-07 Thread Robert Brewer
remember precedence rules. But I can understand why some people would balk at it, so +0.5 from me. ;) Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman

[Python-Dev] Unifying trace and profile

2006-02-21 Thread Robert Brewer
enough of a dream, it would be nice to have a bytecode tracer, which didn't bother with the f_lineno logic in maybe_call_line_trace, but just called the hook on every instruction. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] [1] PyConquer, a trace hook to help understand

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-08 Thread Robert Brewer
Barry Warsaw wrote: On Tue, 2006-02-07 at 16:01 -0800, Robert Brewer wrote: Perhaps, but please keep in mind that the smtpd module uses both, currently, and would have to be rewritten if either is removed. Would that really be a huge loss? It'd be a huge loss for the random fellow

Re: [Python-Dev] Let's just *keep* lambda

2006-02-08 Thread Robert Brewer
emerges from the thousands of random variants? I'd like to suggest this be moved to comp.lang.python and never return. Community consensus on syntax is a pipe dream. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ Python-Dev

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-07 Thread Robert Brewer
most of asyncore's guts were replaced with more advanced Zope code, but the API was maintained for compatibility reasons. A nightmare. Perhaps, but please keep in mind that the smtpd module uses both, currently, and would have to be rewritten if either is removed. Robert Brewer System Architect

Re: [Python-Dev] Keep default comparisons - or add a second set?

2005-12-28 Thread Robert Brewer
for Python. Perhaps you're saying that there is a meaningful comparison between None and anything else, but please clarify if so. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-30 Thread Robert Brewer
is worse than the wrong decision ;-). Exactly how I felt about bringing the decorator decision to a close. ;) Congratulations to you both! Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] PEP 8: exception style

2005-08-06 Thread Robert Brewer
a mistake between: raise ValueError, A and raise (ValueError, A) I'd like to see the first form removed in Python 3k, to help reduce the ambiguity. But PEP 8 taking a stand on it would be a good start for now. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED

Re: [Python-Dev] Request for dev permissions

2005-05-17 Thread Robert Brewer
the next day, by the way. #1203094 Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] P.S. Do you have a valid email address, RB? I wasn't able to fix up your nospam address by hand. ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] PEP 343 - Abstract Block Redux

2005-05-13 Thread Robert Brewer
() is going to be passed as a single arg, then I'd rather have the default exc = (), so I can simply check if exc: in the __exit__ method. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org

RE: [Python-Dev] Anonymous blocks: Thunks or iterators?

2005-04-29 Thread Robert Brewer
then, you'd have the cell issues you mentioned, trying to push values from the thunk's original scope. Bah. It's so tempting on the semantic level, but the implementation's a bear. Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] ___ Python-Dev mailing

[Python-Dev] Re: scope-collapse (was: anonymous blocks)

2005-04-26 Thread Robert Brewer
expression-context use of them. Rewrite the above to: defcallee foo: c = a def bar(): a = a1 collapse foo print c Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org

RE: [Python-Dev] defmacro (was: Anonymous blocks)

2005-04-25 Thread Robert Brewer
Shane Hathaway wrote: Robert Brewer wrote: So currently, all subclasses just override __set__, which leads to a *lot* of duplication of code. If I could write the base class' __set__ to call macros like this: def __set__(self, unit, value): self.begin