[docs] tuple or struct_time
Georg Brandl
georg at python.org
Mon Jan 3 19:41:16 CET 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am 03.01.2011 19:40, schrieb Georg Brandl:
> Am 03.01.2011 19:35, schrieb Alexander Belopolsky:
>> Functions in the time module that expect broken down time are
>> currently documented as accepting "tuple or struct_time". For
>> example,
>
>> http://docs.python.org/py3k/library/time.html#time.strftime
>
>> However, in recent versions, ".. or struct_time" is redundant because
>
>>>>> issubclass(time.struct_time, tuple)
>> True
>
>> I think it would be more informative for a reader to change "tuple or
>> struct_time" to "9-tuple".
>
> I don't think so -- the reader may not be aware of that subclass
> relationship, and the repr() of struct_time also doesn't make that
> clear (which is anyway not its job). It certainly doesn't hurt to
> be a little helpful here.
Ah -- changing tuple to 9-tuple is fine of course.
Georg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
iEUEARECAAYFAk0iGEwACgkQN9GcIYhpnLBizwCglhL2y1DrZzGoucxxjv9/vOFi
8eIAmPuPwKfwEOHdBBGnBTEF8sQtGQI=
=mYM5
-----END PGP SIGNATURE-----
More information about the docs
mailing list