Re: [Python-Dev] i18n

2010-08-17 Thread Anders Sandvig
On Sat, Aug 14, 2010 at 10:18 AM, Jeroen Ruigrok van der Werven wrote: > I doubt you will be able to localize much with regard to the interpreter. > The only thing that really comes to mind are the error and exception > messages, but you will never be able to localize the errors themselves. The >

Re: [Python-Dev] Set the namespace free!

2010-07-26 Thread Anders Sandvig
On Sat, Jul 24, 2010 at 3:31 AM, Gregory P. Smith wrote: > Yuck.  Anyone who feels they need a variable named the same a reserved word > simply feels wrong and needs reeducation.  [...] While I agree with you in principle, I have been finding it frustrating trying to calculate yield in my financi

Re: [Python-Dev] Curious datetime method

2010-07-21 Thread Anders Sandvig
On Tue, Jul 20, 2010 at 5:56 PM, Alexander Belopolsky wrote: > In the real world where we have to take backward compatibility into > account, I would like to make today() and now() to be the same: both > taking optional tz argument, both available as either date or datetime > methods and both cova

Re: [Python-Dev] Curious datetime method

2010-07-20 Thread Anders Sandvig
> I wonder why would anyone want to use datetime.today() instead of > datetime.now()? Because this method is also present in datetime.date. Thus, you can reference stuff like d.today().day without caring whether d is a date or a datetime object. Anders __

[Python-Dev] Regarding socket timeouts in httplib

2010-07-01 Thread Anders Sandvig
Consider the following code for retreieving a web page using httplib:    def get_url(hostname, port, url, timeout=5):        con = httplib.HTTPConnection(hostname, port, timeout)        con.request("GET", url)        res = con.getresponse()        data = res.read()        return res, data As expe