[Python-ideas] Python Object Notation (PyON)

Arnaud Delobelle arnodel at googlemail.com
Sat Nov 1 20:22:00 CET 2008

On 1 Nov 2008, at 17:09, Terry Reedy wrote:

> Zaur Shibzoukhov wrote:
>> Python Object Notation (PyON <http://code.google.com/p/pyon/wiki/GettingStarted 
>> >)
>> Python 2.6/3.0 now has a module ast. This opens up new  
>> opportunities. One of them is the possibility of introducing human  
>> readable/writable literal object notation, based on the syntax of  
>> the python language.
> Other than syntax details, how is PyON different from json, yaml  
> (3rd party module), and anything else?

Looking at the page, it seems to me that it aims to:

* be able to give a string representation of any(*) object like pickle  
and unlike json
* produce human readable output like json and unlike pickle

(*) for a suitable definition of 'any', ideally the same as pickle I  

That would be good.  There are several examples of pyon.loads, but  
none of pyon.dumps, which would be interesting.

E.g. can pyon.dumps dump obj accurately for the following value of obj?

lst = [1, 2]
obj = [lst, lst]

I would expect pyon.dumps(obj) to give something like:
sym0 = [1, 2]
obj = [sym0, sym0]


More information about the Python-ideas mailing list