Skip to content

Added untokenizing code.#2

Open
tmr232 wants to merge 1 commit into
panyam:masterfrom
tmr232:untokenize
Open

Added untokenizing code.#2
tmr232 wants to merge 1 commit into
panyam:masterfrom
tmr232:untokenize

Conversation

@tmr232

@tmr232 tmr232 commented Oct 1, 2015

Copy link
Copy Markdown

Added code to untokenize the resulting parsed values, so that they are converted to proper strings.

Comment thread plists/v1parser.py Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm just a quick one (I should have done this earlier :) ). Can you add comments to this method as well - I wasnt sure of the purpose of the untokenizing. Is it so that if you have a plist stream then the start of the next plist object can be reliably obtained later on?

@tmr232

tmr232 commented Oct 1, 2015

Copy link
Copy Markdown
Author

The untokenize function and accompanying classes are there to enable obtaining the objects recursively.

@panyam

panyam commented Oct 2, 2015

Copy link
Copy Markdown
Owner

Hey sorry for the confusion mate. Can you give me an example on how you would use it?

@panyam

panyam commented Oct 2, 2015

Copy link
Copy Markdown
Owner

Ideally something explaining the API in the readme would be great for other users too :)

@tmr232

tmr232 commented Oct 6, 2015

Copy link
Copy Markdown
Author

OK. Just realize the original code was a mess, and that when I actually modify the project I can do a better job.

The new code makes sure that every time a value is returned (to a dict or a list) it uses the value and not the token class. This is much cleaner code than my original solution.

Also, is there a reason to ever return token instead of strings?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants