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
>
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
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
> 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
__
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