piskvorky / bounter

Efficient Counter that uses a limited (bounded) amount of memory regardless of data size.
MIT License
934 stars 47 forks source link

Use feature detection instead of version detection #27

Closed cclauss closed 6 years ago

cclauss commented 6 years ago

https://docs.python.org/3/howto/pyporting.html#use-feature-detection-instead-of-version-detection

piskvorky commented 6 years ago

I agree in general -- feature detection is preferable when importing from a library, like your link shows.

In this particular case, we're checking a built-in and I'm not so sure. The current code seems both clearer (explicit intent, easier to read and understand) and more future-proof than your alternative (god only knows what unicode will mean in Python 4).

So mild -1 on this one. CC @menshikh-iv @janpom @isamaru .

menshikh-iv commented 6 years ago

@piskvorky @cclauss From me -1 too, I think this change isn't needed.

isamaru commented 6 years ago

@cclauss Does this fix any particular problem with your configuration?

cclauss commented 6 years ago

No. Closing.