06.06.13 12:45, Chris Angelico написав(ла):
For the "accept any object that has a next() method" sorts of rules, I don't know of any really viable system that does that usefully. The concept of implementing interfaces in Java comes close, but the class author has to declare that it's implementing some named interface. In theory there could be something that deduces the validity from the given structure, but I'm not aware of any language that does this.
Go? -- http://mail.python.org/mailman/listinfo/python-list