Hacker News new | past | comments | ask | show | jobs | submit login

What do you mean by inconsistent syntax?



Why does Python use methods for some functionality (e.g. list.index()) but functions for other (e.g. len(list))?

http://effbot.org/pyfaq/why-does-python-use-methods-for-some...

I guess is that.


Collection library has:

  deque

  defaultdict

  Counter
After many years I often write DefaultDict myself.

Edit: formatting




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: