Is this a true statement?

Andrew Dalke dalke at acm.org
Tue Jun 26 23:02:13 CEST 2001


Tim Daneliuk wrote:
>What prevents me from writing out a byte string from Python which is a set
>of primitives for accessing the SM hardware and then building up higher
>level Python interfaces from these primitives?

Nothing.  But it wouldn't be Pythonic -- you would no longer
be using Python.

What's to prevent you from doing something like

import c_compile

func = c_compile.function(params = ("i", "j"),
                          defaults = {"j": 10},
                          returns = types.IntegerType,
                          code = """
return i + j;
""")

>>> func(i = 3)
13
>>>

Again, nothing.  But few would say this should be considered
a Python program.

Whereas in C++ using special per-class allocators is very
C++-ic.

                    Andrew






More information about the Python-list mailing list