Le 06/02/2012 09:23, Kees Bos a écrit :
> On Sun, 2012-02-05 at 18:39 +0100, Pascal Chambon wrote:
>> - what's up with the two __builtin__.py and pyjslib.py modules of
>> pyjs/src/pyjs sources ? __builtin__.py looks much bigger and featureful
>> (ex. it might be able to solve extended slicing problems), but it's only
>> used in DICT implementation, why ?
> The dict implementation differs to much from the proto implementation to
> use the same pyjslib.py. So I had to come up with a different one and
> since most of the stuff is like __builtin__ i named it such. There are
> approaches in __builtin__.py that cannot be used in pyjslib.py. I've not
> finished the dict implementation (yet), and haven't been able to check
> which 'backports' are possible. Per design the dict implementation is
> way more pythonic, but also slower.
>
>
Just in case it hasn't been dealt with yet in the dict translator, you 
might be interested by the uescapejs() function of the proto. String 
encoding is messy in JS, so I just forced every literal to __repr__ 
python encoding ("\xx" and the like), it solves issues with pyv8.

Regards,
PKL

Reply via email to