Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #90414

Re: code blocks

From Peter Otten <__peter__@web.de>
Subject Re: code blocks
Date 2015-05-11 18:59 +0200
Organization None
References (2 earlier) <mailman.340.1431315116.12865.python-list@python.org> <ca2e1795-0eec-4584-ae38-6f6bd7f37585@googlegroups.com> <CAPTjJmraBmENugJatA8Z6omu_pW94kd42jdYFD-fCt81RLQVdA@mail.gmail.com> <miqjoa$17d$1@ger.gmane.org> <CAPTjJmpMYodOf0PDc0ShtAiy-TWm=h3BCLtg7Ha+t2pswF9ZWQ@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.378.1431363599.12865.python-list@python.org> (permalink)

Show all headers | View raw


Chris Angelico wrote:

> On Tue, May 12, 2015 at 2:01 AM, Peter Otten <__peter__@web.de> wrote:
>> Though interestingly, my Py2 doesn't have any help
>>> on exec:
>>>
>>>>>> help('exec')
>>> no documentation found for 'exec'
>>>
>>> Not sure why that is.
>>
>> Path confusion? You may accidentally be importing Python 3's topics.
>> Try
>>
>>>>> from pydoc_data import topics
>>>>> topics.__file__
>> '/usr/lib/python2.7/pydoc_data/topics.pyc'
>>>>> "exec" in topics.topics
>> True
> 
> Peculiar.
> 
> $ python
> Python 2.7.3 (default, Mar 13 2014, 11:03:55)
> [GCC 4.7.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from pydoc_data import topics
>>>> topics.__file__
> '/usr/lib/python2.7/pydoc_data/topics.pyc'
>>>> "exec" in topics.topics
> False
>>>> topics.topics.keys()
> ['conversions', 'debugger', 'attribute-access', 'augassign',
> 'numeric-types', 'context-managers', 'bitwise', 'global', 'numbers',
> 'customization', 'in', 'floating', 'integers', 'naming', 'if',
> 'binary', 'raise', 'for', 'typesmapping', 'subscriptions',
> 'specialnames', 'typesseq', 'dynamic-features', 'bltin-code-objects',
> 'continue', 'dict', 'bltin-type-objects', 'import', 'typesmethods',
> 'pass', 'atom-literals', 'slicings', 'function', 'typesseq-mutable',
> 'bltin-ellipsis-object', 'execmodel', 'return', 'exprlists', 'power',
> 'booleans', 'string-methods', 'assignment', 'callable-types', 'yield',
> 'lists', 'else', 'assert', 'formatstrings', 'objects', 'shifting',
> 'unary', 'compound', 'typesfunctions', 'imaginary', 'specialattrs',
> 'with', 'class', 'types', 'break', 'calls', 'try', 'identifiers',
> 'atom-identifiers', 'id-classes', 'bltin-null-object', 'while',
> 'attribute-references', 'del', 'truth', 'sequence-types',
> 'exceptions', 'comparisons', 'operator-summary', 'typesmodules',
> 'strings', 'lambda']

Note that "print" is missing, too.

> Whatever. I've made a few messes on this system, maybe I broke
> something somewhere. 

Probably.

> In any case, help('exec') is what's needed for
> help on keywords, even if one particular installation doesn't have one
> particular keyword-help.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

code blocks "Dr. John Q. Hacker" <zondervanz@gmail.com> - 2015-05-02 13:30 -0500
  Re: code blocks Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-03 11:56 +0100
  Re: code blocks zipher <dreamingforward@gmail.com> - 2015-05-10 18:39 -0700
    Re: code blocks Ian Kelly <ian.g.kelly@gmail.com> - 2015-05-10 21:31 -0600
      Re: code blocks Rustom Mody <rustompmody@gmail.com> - 2015-05-10 20:40 -0700
      Re: code blocks zipher <dreamingforward@gmail.com> - 2015-05-11 08:22 -0700
        Re: code blocks zipher <dreamingforward@gmail.com> - 2015-05-11 08:23 -0700
        Re: code blocks Chris Angelico <rosuav@gmail.com> - 2015-05-12 01:40 +1000
        Re: code blocks Peter Otten <__peter__@web.de> - 2015-05-11 18:01 +0200
        Re: code blocks Chris Angelico <rosuav@gmail.com> - 2015-05-12 02:07 +1000
          Re: code blocks zipher <dreamingforward@gmail.com> - 2015-05-11 09:51 -0700
        Re: code blocks Peter Otten <__peter__@web.de> - 2015-05-11 18:59 +0200
    Re: code blocks Ian Kelly <ian.g.kelly@gmail.com> - 2015-05-10 21:36 -0600

csiph-web