| |Crys| | It works in all my applications |
| deltab | CSWookie: how? |
| |Crys| | arkanes: yeah that will work but a dt.totimestamp() method is very convenient in my opinion |
| CSWookie | deltab: Once you've got a pytz tzaware datetime, it should be able to figure out whether this is timechange day and respond appropriately. Probably by delegating some decisions to the tzinfo object. |
| the_hoser | RHEL5 looks neet can't wait to play with that |
| deltab | CSWookie: how do I get that? |
| |Crys| | Dealing with DST and time zones s... Let's all switch to UTC :] deltab: timedelta defines a day as 86400 seconds. If you create a timedelta object with 86401 seconds it normalizes the value to 1 day and 1 second |
| the_hoser | omg... now I know why reactos is so fast :-/ because one of the devs is OBSESSED with optimization |
| ironfroggy | optimization obsession does not make good optimization. |
| the_hoser | ironfroggy: i know... |
| hays | ugh, I see coming on the optimization rerun |
| ironfroggy | as a matter of fact, its often good to be quite a bit procrasticatory about it. |
| _chris_ | you know how sometiems you can have a class named Foo, and you already have an instance of Foo (let's call it foo) |
| ironfroggy | let us not, hays |
| _chris_ | and you can just call: foo() |
| hays | :) |
| _chris_ | i thought there was some method that gets called for that like __call__ |
| arkanes | _chris_: yes, that one |
| ironfroggy | yeah thats it |
| _chris_ | but when i do a dir(foo) i don't see a __call__ |
| arkanes | dir is a big fibber |
| CSWookie | deltab: You supply the timezone to pytz, and it knows what geographic timezone you're in, and gives you a tzinfo. You then get a tz aware datetime (I don't rememebr how, check the web page for pytz). When you say with your timedelta, roll me back a day, please, it should roll you back one day (where that is defined as same time, one less day of month). If you then grab a timedelta by subtracting the one from the other, it should say that it is one day d |
| _chris_ | arkanes: hah |
| the_hoser | in his defence... he's going on about optimizing exception handling... which i suppose is important... |
| arkanes | it has some heuristics and only shows "interesting" attributes __dict__.keys() is a better way |
| ironfroggy | actually, its because foo has no __call__method but, the class type does. basically, it inherits __call__ either honestly, or effectively. |
| |Crys| | arkanes: bad idea for new style classes with __slot__ and C extension types |
| _chris_ | ironfroggy: ahhh ok hmmm anyone worked with WovenContext at all? |
| arkanes | |Crys|: dir won't work on them either |