check whether a value is scalar

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Mon Apr 24 21:38:24 EDT 2006


Eli a écrit :
> Python treats integers as objects, but as I mentioned that I do care
> about the value only, and not its object methods. I mean that it's not
> possible to share objects among application in different programming
> languages, but it's possible to share the scalar values among them.

Not so easily. Lower level languages have some strange rules about size 
of an integer, signed/unsigned stuff, precision issues for floats, 
etc... - and of course different representations for a 'string'.

> Strings, booleans, integeres, floats, null are types that most
> programming languages use. Arrays are also commonly used, but each
> programming language defines and uses it differently,

Same thing for strings.

> so it's more
> problematic to treat it as scalar (for example python uses dictionaries

Python's dicts are hastables, not arrays.

> while other langs uses regular arrays only).





More information about the Python-list mailing list