On Friday, September 23, 2016 at 3:38:21 AM UTC+12, Chris Angelico wrote: > This is why, despite the confusion it sometimes causes, we all prefer > duck typing to static typing. The csv.DictReader wants a "file-like > object", not necessarily a file - and in this case, all it asks is an > iterable of lines, so a simple generator will work. This is true of > MANY, if not all, places that a file is used.
Duck type is great for sticking pieces of Python code together. And anybody who doesn’t like it can go Java themselves... -- https://mail.python.org/mailman/listinfo/python-list