pombreda / pydot

Automatically exported from code.google.com/p/pydot
MIT License
0 stars 0 forks source link

pydot.needs_quotes does not return True if given a dot keyword #57

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. python -c 'import pydot; print pydot.needs_quotes("graph")'

What is the expected output?
True

What do you see instead?
False

What version of the product are you using?
svn trunk

Please provide any additional information below.

Quoting needs_quotes docstring:

    If the string is one of the reserved keywords it will
    need quotes too.

Original issue reported on code.google.com by JustusWi...@gmail.com on 21 Aug 2011 at 10:59

GoogleCodeExporter commented 9 years ago
Changing a True to False should do the trick.

Original comment by musically.ut on 3 Oct 2011 at 12:03

Attachments:

GoogleCodeExporter commented 9 years ago
pydot can't decide when something is a keyword or when it's a name. If an 
element's name collides with a keyword it will need to be enclosed in quotes 
when passed to pydot.

Original comment by ero.carr...@gmail.com on 2 Jan 2012 at 10:00