On 8/5/2016 6:00 PM, Marco Sulla via Python-list wrote:
I have a simple curiosity: why Python has much keywords, and some
builtin types and methods, that are different from the other
languages? What is the rationale?

I'm referring to:
* `except` instead of `catch`

Python partly takes its cue from English.

'Try do this, except if it does not work, do that instead.' Catch? makes no sense in this respect.

* `raise` instead of `throw`

When you talk with people, do you raise an objection, or throw one? Admittedly, some people throw tantrums ;-)/

* `dict` instead of `map`

A python dict is much more similar to a real world dictionary than a paper map.

* `list.append()` instead of `list.push()`

Lists are not just stacks. I got a bit of flack for proposing the addition of list.pop, long after list.append, to make them more usable as stacks. Append is definitely the command language word for adding something to the end of a sequence.

--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to