I'd imagine that there would be some way to do it. But I feel compelled to ask, is there really a big enough difference in readability from this
Allocation(Param1 = Val1, Param2 = Val2 )
To this:
Allocation(Param 1 = Val1, Param 2 = Val2 )
to make that big a difference? I'm sure there's a way to do what you want to do, but my first concern is if the effort involved would be worth the result.
my goal is to provide a DSL which can be used for data entry into the system. In the above scenario, params would be people names and values would be percentages.
I have a better understanding of what you want to do now, but I still think that you might end up having to sacrifice some readability to get what you want. Personally, I would go with something like:
Allocation(
{ 'name1' : value1,
'name1' : value2, }
)
If that's not something you can go with, then you might want to reconsider whether you want to use Python for your DSL or go with something home-grown. Allowing whitespace allows too many ambiguities for most programming languages to allow it.
If you still want to pursue this with using python, you might want to consider posting to the C-API SIG (SIGS) or maybe the python-dev list (as a last resort). The only way that I can see to do this would be to embed the python interpreter into a C/C++ program and do some kind of hacking with it (which can be difficult!).