1. Georg Brandl
  2. pygments-main
  3. Issues
Issue #863 resolved

Docs example err.(Wrong result)

birdhackor
created an issue

In http://pygments.org/docs/quickstart/

There has a example

>>> from pygments.lexers import guess_lexer, guess_lexer_for_filename
>>> guess_lexer('#!/usr/bin/python\nprint "Hello World!"')
<pygments.lexers.PythonLexer>
>>> guess_lexer_for_filename('test.py', 'print "Hello World!"')
<pygments.lexers.PythonLexer>

but i test

>>> guess_lexer('#!/usr/bin/python\nprint "Hello World!"')
<pygments.lexers.NumPyLexer>

OS: Ubuntu 12.04 server

python: 2.7.3

pygments: 1.6

Comments (5)

  1. Log in to comment