Python internal design

E

Emre Turkay

Hi Folks,

I am designing a tool, in which there are dynamic types and
variables with these types. In this respect, it is more like an
interpreted language design.

I wonder how these issues are implemented in Python are there any
documents or articles about it, which I can read and get an idea.

Thanks,

emre
 
M

Maurice LING

Emre said:
Hi Folks,

I am designing a tool, in which there are dynamic types and
variables with these types. In this respect, it is more like an
interpreted language design.

I wonder how these issues are implemented in Python are there any
documents or articles about it, which I can read and get an idea.

Thanks,

emre

Hi,

I've been trying to look that up as well, in CoRR, ACM digital library
but not much luck. I've got only peripheral hits using "python virtual
machine" as search term. If you are looking for something at the level
of "python language specification" and "python virtual machine
specification", I am unable to find anything yet.

Please tell me if you managed to find something useful.

Cheers
Maurice
 
V

Ville Vainio

Emre> Hi Folks,

Emre> I am designing a tool, in which there are dynamic types and
Emre> variables with these types. In this respect, it is more like
Emre> an interpreted language design.

Emre> I wonder how these issues are implemented in Python are
Emre> there any documents or articles about it, which I can read
Emre> and get an idea.

It's built around string lookup.

obj.stuff() -> look up what object is associated with string 'stuff',
get the object, see how it can be called, call it.
 
T

Terry Reedy

There is no single doc other that the source, but lots of bits and pieces
scattered thru clp archives. The CPython interpreter, tokenizes, parses,
and compiles Python to CPython bytecode. The library manual chapter on the
dis module defines the stack-based CPython virtual machine. The bytecode
is interpreted in a loop with a giant switch (ceval.c). Python objects
have a common header and a type-specific value section. For builtin type
objects, the value section is a standard set of slots for functions
corresponding to the various operators and builtins. For more, see the
source or persistently search Google's archive for the group.

Terry J. Reedy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,236
Messages
2,571,184
Members
47,820
Latest member
HortenseKo

Latest Threads

Top