diff options
| author | Georg Brandl <georg@python.org> | 2007-01-20 18:48:39 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2007-01-20 18:48:39 +0100 |
| commit | f6ad7b43ffc58d1dc55356df73618de0476fb06c (patch) | |
| tree | 0decd85824e1e0ae601b394c4431a2a08286aa70 /docs | |
| parent | fd576052d32df2b5ac7ad24db602415e84f98e0f (diff) | |
| download | pygments-git-f6ad7b43ffc58d1dc55356df73618de0476fb06c.tar.gz | |
[svn] Some minor cleanup.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/src/tokens.txt | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/docs/src/tokens.txt b/docs/src/tokens.txt index 22ccccea..f98b4d6e 100644 --- a/docs/src/tokens.txt +++ b/docs/src/tokens.txt @@ -81,20 +81,21 @@ of those token aliases, a number of subtypes exists (excluding the special token The `is_token_subtype()` function in the `pygments.token` module can be used to test if a token type is a subtype of another (such as `Name.Tag` and `Name`). -(This is the same as ``Name.Tag in Name``. The in operator was newly introduced -in pygments 0.7, the function still exists for backwards compatiblity) +(This is the same as ``Name.Tag in Name``. The overloaded `in` operator was newly +introduced in Pygments 0.7, the function still exists for backwards +compatiblity.) -With pygments 0.7 it's also possible to convert token from strings (for example +With Pygments 0.7, it's also possible to convert strings to token types (for example if you want to supply a token from the command line): .. sourcecode:: pycon - >>> from pygments.token import String, string_to_token - >>> string_to_token("String") + >>> from pygments.token import String, string_to_tokentype + >>> string_to_tokentype("String") Token.Literal.String - >>> string_to_token("Token.Literal.String") + >>> string_to_tokentype("Token.Literal.String") Token.Literal.String - >>> string_to_token(String) + >>> string_to_tokentype(String) Token.Literal.String |
