conatraints on "for" magic?

Matthew Cline matt at nightrealms.com
Wed Jul 26 01:08:44 EDT 2000


In article <8llqso$q75$1 at news.dtc.hp.com>, weeks at golden.dtc.hp.com
((Greg Weeks)) wrote:

> How did the implementer of the "fileinput" module convince the "for"
> construct that fileinput.input() was a sequence?

You can subclass from UserList to have a class that acts like
a sequence.





More information about the Python-list mailing list