3 ms·
What's your favourite operator feature?
by kzrdude 4y ago
What's your favourite operator feature?
- Etherlord87 4y agoI'm not the same person, but there's not much in operator module that can't be done by simply using an operator symbol. It's useful to use in e.g. map(), but you could use lambdas instead (for some performance overhead as mentioned). operator.countOf() is perhaps the hardest to reimplement in lambda, as it's more reliable than lambda x: x.count() - for example it will work for dictionary.values() as well.