Deleplace / programming-idioms

A collection of good snippets, in a lot of languages
Apache License 2.0
128 stars 8 forks source link

Remove all code specific to Python 2.7 #184

Closed Deleplace closed 2 years ago

Deleplace commented 2 years ago

If some code works in Python 2.7 but not in Python 3.0+, then it should not be regarded as idiomatic anymore.

We should remove it, in order to not promote the legacy, unsupported version of Python.

Deleplace commented 2 years ago

https://programming-idioms.org/idiom/219/diff/38/39

https://programming-idioms.org/idiom/26/diff/96/97

https://programming-idioms.org/idiom/169/diff/96/97

https://programming-idioms.org/idiom/104/diff/13/14

Deleplace commented 2 years ago

Removed all the implementations that clearly indicated themselves being "Python 2 only".

Next step would be: make sure all of the remaining snippets actually work properly in Python 3.