Favorite non-python language trick?

Steve lonetwin at gmail.com
Sat Jun 25 01:37:09 EDT 2005


Hi,

> I'm curious -- what is everyone's favorite trick from a non-python
> language? And -- why isn't it in Python?

One thing that I miss every once in a while is "pre-processing". I'm
wondering if I'm the only one here, since nobody seems to have brought
that up. For example, after testing is done and I need to release some
bit of code in production, I would like create the .pyc/.pyo, like so:

# pycompile -DMAX_FOO=100 -D__version__=1.0 -D__release__=1.stable foo_module.py

where pycompile, is an home baked script that maybe uses compile/compileall. 

I know, I can do the preprocessing myself in pycompile, but this would
be a nice to have.

Regards
Steve



On 6/24/05, Joseph Garvin <k04jg02 at kzoo.edu> wrote:
> As someone who learned C first, when I came to Python everytime I read
> about a new feature it was like, "Whoa! I can do that?!" Slicing, dir(),
> getattr/setattr, the % operator, all of this was very different from C.
<...snip...>



More information about the Python-list mailing list