Re: [Tutor] Re: Syntax Check

2005-01-27 Thread Chad Crabtree
I'm going to look more in to import hooks.  I am only looking for 
syntactic sugar, at least at this point.  It's not really my ambition
to 
make more efficient code. 

To Ryan.  I looked at COG before (not in this case but general
looking 
at python packages) it doesn't really do what I was thinking, but I
can 
see how it would be very useful for it's problem domain of code 
generation for other languages.

Javier Ruere wrote:

>  Yes. To add new stuff to the language you would have to work at
the
>interpreter level. Probably you can avoid going too deep using
import
>hooks, as it has already been suggested, to modify what's being
imported
>on the fly.
>  I believe it could work like Psyco if the preprocessor installed
the
>import hooks when imported.
>  Are you interested only in the syntactic sugar or you plan to
generate
>more efficient code?
>  
>



__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Re: Syntax Check

2005-01-27 Thread Javier Ruere
Chad Crabtree wrote:
> Ok I'll explain what I've done so far.
[...]
> I hope I made myself clearer.

  Yes. To add new stuff to the language you would have to work at the
interpreter level. Probably you can avoid going too deep using import
hooks, as it has already been suggested, to modify what's being imported
on the fly.
  I believe it could work like Psyco if the preprocessor installed the
import hooks when imported.
  Are you interested only in the syntactic sugar or you plan to generate
more efficient code?

Javier

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Re: Syntax Check

2005-01-27 Thread Javier Ruere
Chad Crabtree wrote:
> Does anyone happen to know how to turn of the syntax checking in 
> python?  I've been working on a module driven preprocessor but I'd
> like to not have to use comment strings.

  I don't think that's possible. What would the compiler do with code
with an invalid syntax?
  What's a module driven preprocessor?

Javier

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor