[issue3934] sphinx - building muppy docs fails on Linux

2008-09-22 Thread robwolfe

New submission from robwolfe <[EMAIL PROTECTED]>:

I've tried to build muppy (http://packages.python.org/muppy/)
documentation on:
$ python2.5 -c "import sys; print sys.version"
2.5 (release25-maint, Dec  9 2006, 14:35:53)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-20)]

with Sphinx (version 0.4.2) and got this error:

$ make doctest mkdir -p build/doctest
sphinx-build -b doctest -d build/doctrees   source build/doctest
Sphinx v0.4.2, building doctest
trying to load pickled env... not found
building [doctest]: targets for 15 source files that are out of date
updating environment: 15 added, 0 changed, 0 removed
reading... changes copyright detailed_toc glossary index intro
library/library library/muppy library/refbrowser Exception occurred:
  File
"/usr/lib/python2.5/site-packages/Sphinx-0.4.2-py2.5.egg/sphinx/ext/autodoc.py",
line 313, in generate_rst
if not mod_cls:
UnboundLocalError: local variable 'mod_cls' referenced before assignment
The full traceback has been saved in /tmp/sphinx-err-XRu3ZJ.log, if you
want to report the issue to the author.
Please also report this if it was a user error, so that a better error
message can be provided next time.
Send reports to [EMAIL PROTECTED] Thanks!
make: *** [doctest] Błąd 1

The simple patch I've attached helped of course.

--
assignee: georg.brandl
components: Documentation tools (Sphinx)
files: autodoc.patch
keywords: patch
messages: 73587
nosy: georg.brandl, robwolfe
severity: normal
status: open
title: sphinx - building muppy docs fails on Linux
type: crash
versions: Python 2.5
Added file: http://bugs.python.org/file11560/autodoc.patch

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3934>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4246] execution model - clear and complete example in documentation

2008-11-01 Thread robwolfe

New submission from robwolfe <[EMAIL PROTECTED]>:

I'd like to propose adding some complete example regarding scopes and
bindings resolving to execution model description.
There is no week on pl.comp.lang.python without a question about
UnboundLocalError problem. I'm getting tired answering that. ;-)
It does not have to look so verbose as my (attached) example, but please
add some example, which will clarify this issue.

--
assignee: georg.brandl
components: Documentation
files: scopes.py
messages: 75441
nosy: georg.brandl, robwolfe
severity: normal
status: open
title: execution model - clear and complete example in documentation
type: feature request
versions: Python 2.6
Added file: http://bugs.python.org/file11924/scopes.py

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4246>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4246] execution model - clear and complete example in documentation

2008-11-08 Thread robwolfe

robwolfe <[EMAIL PROTECTED]> added the comment:

People seem to understand that they can not use variable before
definition. But this dramatically change when they come across nested
functions. They don't understand when variable can be resolved from
outer scope and when can not, e.g:

def outer():
x = 1
def inner1():
print(x)
def inner2():
print(x)
# [... some instructions (maybe a lot) ...]
x = 1

They are always confused why `inner1` works but `inner2` doesn't.

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4246>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com