-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NameError: name 'xrange' is not defined #28
Comments
Is this reference to xrange in the tutorial code or in the Histogrammar code? Although we try to make Histogrammar Python 3 compliant, no such attempt was made for the documentation. There are probably also some It would be hard to put the documentation into continuous integration to check for Python-2isms. |
Oh, hi Chetan! |
Hello! |
You're free to edit the histogrammar-docs repository (on a separate branch with pull request, following standard practices), if you're interested. In fact, it would be a good exercise to check out and generate documentation with Jekyll because you'll probably be adding more at some point. But it's not a goal to support Python 3 in the documentation text, since the user can see that as they type it. Python 3 users shouldn't type "xrange." I'm going to close this now, but you can open another one on histogrammar-docs, fix it, and then close it. |
Hey everyone, I was going through the: 'Making plots with matplotlib' part of python docs and in the section: 'First Histogram'

it throws an error:

I guess in data = [random.random() for i in xrange(2000)], data should be declared as: data = [random.random() for i in hg.xrange(2000)]
Plus after executing the ditto code from docs, the plot looks something likes this:
instead of:
The text was updated successfully, but these errors were encountered: