osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Class Issue`


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