[Python-Dev] Re: Simulating shells (was Re: Changing the Division Operator -- PEP 238, rev 1.12)

Paul Prescod paulp@ActiveState.com
Mon, 30 Jul 2001 12:20:27 -0700


Michael Hudson wrote:
> 
>...
> 
> At one point I was going to use the same bits as are used in the
> code.co_flags field, which was probably where the bitfield idea
> originated.
> 
> By "keyword arguments" do you mean e.g:
> 
>    compile(source, file, start_symbol, generators=1, division=0)
> 
> ?  I think that would be mildly painful for the one use I had in mind
> (the additions to codeop), and also mildly painful to implement.

Sorry, could you elaborate on why this is painful to use and implement?
Considering the availability of **args, the code above looks to me like
syntactic sugar for the code below:

>    compile(source, file, start_symbol,{'generators':1, 'division':0})
> 
> would be better from my point of view.  I think this is a bit of a
> propeller-heads-only feature, to be honest, so I'm not that inclined
> to worry aobut the API.

I would just like to see an end to the convention of using bitfields in
Python everywhere. You're just my latest target. Python is not a really
great bit-manipulation language!
-- 
Take a recipe. Leave a recipe.  
Python Cookbook!  http://www.ActiveState.com/pythoncookbook