> However, be careful with string types. If you do u'a' 'b', you are
r910
> 62 - autoload = False
> 63 + #autoload = False
r911
> 44 +from sqlalchemy import Table, Column, ForeignKey
> 45 +from sqlalchemy.orm import relation
> 46 +from sqlalchemy.exceptions import InvalidRequestError
>
> I think you can get those from ibid.db
r912. InvalidRequestError was not there, but I added it. That ok?
> Inside brackets (of any kind), you don't need a continuation character (\).
> There are lots of those.
r913
> 500 +class Contest:
>
> Newstyle, please.
r914
> 533 + u'start': self.start.strftime('%d %b %Y %H:%M:%S'),
>
> There's a helper function for formatting times in a bot-wide configurable
> format.
r915. Nice, it even converts to local tz which I was planning on adding later. :)
> 538 + return mktime(self.start.timetuple()) -
> mktime(other.start.timetuple())
>
> I think datetimes can be subtracted from each other (giving a timedelta). But
> obviously this works.
In [1]: datetime.now() - datetime.now()
Out[1]: datetime.timedelta(-1, 86399, 999985)
I don't see a way to get the sign from that that will always work, besides adding days+hours+minutes+... (which is worse than what I currently have)
> However, be careful with string types. If you do u'a' 'b', you are
r910
> 62 - autoload = False
> 63 + #autoload = False
r911
> 44 +from sqlalchemy import Table, Column, ForeignKey exceptions import InvalidRequestError
> 45 +from sqlalchemy.orm import relation
> 46 +from sqlalchemy.
>
> I think you can get those from ibid.db
r912. InvalidRequestError was not there, but I added it. That ok?
> Inside brackets (of any kind), you don't need a continuation character (\).
> There are lots of those.
r913
> 500 +class Contest:
>
> Newstyle, please.
r914
> 533 + u'start': self.start. strftime( '%d %b %Y %H:%M:%S'),
>
> There's a helper function for formatting times in a bot-wide configurable
> format.
r915. Nice, it even converts to local tz which I was planning on adding later. :)
> 538 + return mktime( self.start. timetuple( )) - other.start. timetuple( ))
> mktime(
>
> I think datetimes can be subtracted from each other (giving a timedelta). But
> obviously this works.
In [1]: datetime.now() - datetime.now() timedelta( -1, 86399, 999985)
Out[1]: datetime.
I don't see a way to get the sign from that that will always work, besides adding days+hours+ minutes+ ... (which is worse than what I currently have)