News for hackers. Stuff that matters.
Re:Python's “Disappointing” Superpowers by HdS84 on Thursday February 02, 2023 @03:00PM (#34632192)
What's missing here is an Ienumerable from c#. That's basically anything that can be iterated like a list. So a function could take this enumerable and convert it to a list but should probably reject everything else.

And yes generally agree that Paramus should be not be too accepting. It gets confusing fast.

Re:Python's “Disappointing” Superpowers by collinmanderson on Saturday February 04, 2023 @04:16PM (#34658375)
> What's missing here is an Ienumerable from c#. That's basically anything that can be iterated like a list. So a function could take this enumerable and convert it to a list but should probably reject everything else.

Python has an Iterable type class for this.

https://docs.python.org/3/library/typing.html#nominal-vs-str...

https://docs.python.org/3/library/collections.abc.html#colle...