Custom Query (132 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (46 - 48 of 132)

Ticket Resolution Summary Owner Reporter
#42 wontfix List objects are unhashable xi dfnord@…

Reported by dfnord@…, 7 years ago.

Description

Even though yaml specification allows lists ("flow collections on yaml jargon") to be keys, pyaml fails to use them, as lists are unhashable.

For instance, loading "[1, 2]: something" gives the error "found unacceptable key (list objects are unhashable)"

As a away around this, flow collections could be translated into a simple hasheable subclass of list, such as:

class HasheableList(list):
    #############################
    ## Public Methods
    #############################
    def __hash__(self):
        return hash(tuple(self))
#6 fixed pyyaml 3000 is not in the Python cheese shop xi dholth@…

Reported by dholth@…, 8 years ago.

Description

Also consider this word of wisdom from PEP 8: "Modules should have short, lowercase names, without underscores."

Thanks!

#112 worksforme error on help() xi donny.viszneki@…

Reported by donny.viszneki@…, 5 years ago.

Description

Using Windows XP and Python 2.5.1

C:\Documents and Settings\Joe Sizlack\Desktop\hackers>easy_install pyyaml
Searching for pyyaml
Reading http://pypi.python.org/simple/pyyaml/
Couldn't find index page for 'pyyaml' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
Reading http://pypi.python.org/simple/PyYAML/
Reading http://pyyaml.org/wiki/PyYAML
Best match: PyYAML 3.07
Downloading http://pyyaml.org/download/pyyaml/PyYAML-3.07.win32-py2.5.exe
Processing PyYAML-3.07.win32-py2.5.exe
creating 'c:\docume~1\joesiz~1\locals~1\temp\easy_install-5slfsi\PyYAML-3.07-py2
.5-win32.egg' and adding 'c:\docume~1\joesiz~1\locals~1\temp\easy_install-5slfsi
\PyYAML-3.07-py2.5-win32.egg.tmp' to it
Moving PyYAML-3.07-py2.5-win32.egg to c:\python25\lib\site-packages
Adding PyYAML 3.07 to easy-install.pth file

Installed c:\python25\lib\site-packages\pyyaml-3.07-py2.5-win32.egg
Processing dependencies for pyyaml
Finished processing dependencies for pyyaml

C:\Documents and Settings\Joe Sizlack\Desktop\hackers>python
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import yaml
>>> help(yaml)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python25\lib\site.py", line 346, in __call__
    return pydoc.help(*args, **kwds)
  File "C:\Python25\lib\pydoc.py", line 1645, in __call__
    self.help(request)
  File "C:\Python25\lib\pydoc.py", line 1689, in help
    else: doc(request, 'Help on %s:')
  File "C:\Python25\lib\pydoc.py", line 1481, in doc
    pager(title % desc + '\n\n' + text.document(object, name))
  File "C:\Python25\lib\pydoc.py", line 324, in document
    if inspect.ismodule(object): return self.docmodule(*args)
  File "C:\Python25\lib\pydoc.py", line 1072, in docmodule
    contents.append(self.document(value, key, name))
  File "C:\Python25\lib\pydoc.py", line 325, in document
    if inspect.isclass(object): return self.docclass(*args)
  File "C:\Python25\lib\pydoc.py", line 1196, in docclass
    lambda t: t[1] == 'method')
  File "C:\Python25\lib\pydoc.py", line 1146, in spill
    name, mod, object))
  File "C:\Python25\lib\pydoc.py", line 326, in document
    if inspect.isroutine(object): return self.docroutine(*args)
  File "C:\Python25\lib\pydoc.py", line 1257, in docroutine
    doc = getdoc(object) or ''
  File "C:\Python25\lib\pydoc.py", line 82, in getdoc
    result = inspect.getdoc(object) or inspect.getcomments(object)
  File "C:\Python25\lib\inspect.py", line 521, in getcomments
    lines, lnum = findsource(object)
  File "C:\Python25\lib\inspect.py", line 510, in findsource
    if pat.match(lines[lnum]): break
IndexError: list index out of range
>>>
Note: See TracQuery for help on using queries.