Class Issue`

Terry Reedy tjreedy at udel.edu
Tue Mar 5 21:04:43 EST 2019


On 3/5/2019 6:11 PM, Kevin Hu wrote:

> Python is a language with very weak typing,

Python runtime objects are strongly dynamically typed.  Their type/class 
is one of their attributes.  All classes are subclasses of class 
'object'.  Python names (variables) are untyped in a sense, or one could 
say their default type is 'object'.

and it’ll happily shoehorn data into variables

This describes C, which puts data into permanently names blocks of 
memory.  Python puts data into objects, not names.  It associates 
names/variables with objects.

it’ll assign arguments to parameters in order, which is the expected 
behavior.

Parameters are names and arguments are objects.  Yes, if the arguments 
are not named in a called, they named in order.

-- 
Terry Jan Reedy





More information about the Python-list mailing list