Custom Query (121 matches)
Results (67 - 69 of 121)
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #107 | invalid | remove unused variable in representer | xi | py4fun@… |
| Description |
remove unused list self.object_keeper in representer Index: C:/projects/workspace_python/PyYAML_2/lib/yaml/representer.py
===================================================================
--- C:/projects/workspace_python/PyYAML_2/lib/yaml/representer.py (revision 298)
+++ C:/projects/workspace_python/PyYAML_2/lib/yaml/representer.py (working copy)
@@ -26,14 +26,12 @@
self.default_style = default_style
self.default_flow_style = default_flow_style
self.represented_objects = {}
- self.object_keeper = []
self.alias_key = None
def represent(self, data):
node = self.represent_data(data)
self.serialize(node)
self.represented_objects = {}
- self.object_keeper = []
self.alias_key = None
def get_classobj_bases(self, cls):
@@ -54,7 +52,6 @@
# raise RepresenterError("recursive objects are not allowed: %r" % data)
return node
#self.represented_objects[alias_key] = None
- self.object_keeper.append(data)
data_types = type(data).__mro__
if type(data) is types.InstanceType:
data_types = self.get_classobj_bases(data.__class__)+list(data_types)
|
|||
| #108 | invalid | Setup.py install missing section header error | xi | anonymous |
| Description |
When I try to install pysyck on mac osx 10.5.5 by typing python setup. py install I get the following error: Traceback (most recent call last):
File "setup.py", line 121, in <module>
'build_ext': PySyckBuildExt,
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/core.py", line 125, in setup
dist.parse_config_files()
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py", line 373, in parse_config_files
parser.read(filename)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ConfigParser.py", line 267, in read
self._read(fp, filename)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ConfigParser.py", line 462, in _read
raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: /Users/s031540/.pydistutils.cfg, line: 1
'{\\rtf1\\ansi\\ansicpg1252\\cocoartf949\\cocoasubrtf350\n'
I used to get another error, syck.h not found, then I made a file in my home folder thanks to xi: I'd suggest you to create a file named .pydistutils.cfg in your home directory and add the following lines to it: [build_ext] include_dirs=/usr/local/include library_dirs=/usr/local/lib The Syck.h error disappeared, but I can't get the new one to go away, nor can I find solutions online. I anybody has any idea, that would be great! |
|||
| #117 | invalid | Key Ordering | xi | pschmitt@… |
| Description |
I dont understand how PyYAML reads YML files with "Block Mapping", (I call these "Nested variables" in my example): >>> document = """ Variable 1: x: a y: b z: c Variable 2: 1: a 2: b 3: c """ >>> yml=yaml.load(document) >>> yml.keys() ['Variable 2', 'Variable 1'] >>> yml["Variable 1"].keys() ['y', 'x', 'z'] So it looks like PyYAML loads the document in reverse order, "Variable 2" is read before "Variable 1". That's fine. But why is ymlVariable 1?.keys() in a random order? It seems like it should either be chronological (x,y,z) or reverse chronological (z,y,x). I'm having a hard time parsing tickets #29 and #116, which might be related... Can you offer up some insight? PS: Sorry if this is the wrong place for a question... I couldn't find a mailing list. |
|||
