[Python-Dev] Checking input range in time.asctime and time.ctime (original) (raw)
Alexander Belopolsky alexander.belopolsky at gmail.com
Thu Jan 6 06:10:41 CET 2011
- Previous message: [Python-Dev] Checking input range in time.asctime and time.ctime
- Next message: [Python-Dev] Checking input range in time.asctime and time.ctime
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Jan 5, 2011 at 10:50 PM, Guido van Rossum <guido at python.org> wrote: ..
But what guarantees do we have that the system functions accept negative values for tmyear on all relevant platforms?
Also note that the subject of this thread is limited to "time.asctime and time.ctime." The other functions came into discussion only because the year range checking code is shared inside the time module. If calling specific system functions such as strftime with tm_year < 0 is deemed unsafe, we can move the check to where the system function is called. No system function is called from time.asctime anymore and time.ctime(t) is now time.asctime(localtime(t)).
- Previous message: [Python-Dev] Checking input range in time.asctime and time.ctime
- Next message: [Python-Dev] Checking input range in time.asctime and time.ctime
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]