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


Groups > comp.lang.python > #90407

Re: code blocks

Path csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.008
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'importing': 0.05; 'subject:code': 0.07; 'broke': 0.09; 'whatever.': 0.09; 'cc:addr :python-list': 0.11; 'python': 0.11; '"exec"': 0.16; "'for',": 0.16; "'if',": 0.16; "'in',": 0.16; "'with',": 0.16; '2.7.3': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'somewhere.': 0.16; 'topics': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'import': 0.22; 'cc:addr:python.org': 0.22; 'installation': 0.23; 'cc:2**0': 0.24; "i've": 0.25; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; "skip:' 10": 0.31; '>>>>': 0.31; 'accidentally': 0.31; 'keywords,': 0.31; "skip:' 40": 0.31; 'maybe': 0.34; 'something': 0.35; 'case,': 0.35; 'received:google.com': 0.35; 'false': 0.36; 'system,': 0.38; 'needed': 0.38; 'skip:[ 10': 0.38; '12,': 0.39; 'sure': 0.39; 'even': 0.60; 'is.': 0.60; 'more': 0.64; 'mar': 0.68; 'topics.': 0.68; '2014,': 0.84; '2015': 0.84; 'otten': 0.84; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=oxDwF9yNfGxs1wkg5eDfJgsCPZ7yIaYzr8AoWVH+l9s=; b=XSH7qAmKuSo+F7Wv7exO3FdNOpqcJA1HcOSJunm/6wt1uF1KCdyEZ+Pi1Pw8xqiQnJ GHc0/B6pg+0u+X6W6z39ly4n1n4/YFBXrDS1lawdbtUTEbhNiKJ3yOmXyP160ElzSudm DoTosAHJAML9R0k+6hFX6aZXwxEpzmoPqdIcvF1uUsmxzpA5PmdQDGblnwsPN9dWFDcd 4SGAfSpwsVKbqf2U4SxWJDVhabVMKtCKvMZia4Kx1t8bHUaRRbhWlF3+HU4XoM9M6JGQ meuivRsbWL7Jq7eoTPjX0nBp3DwioR/pYUTlf5d78Db/z1R/Kdw2h4pIltdkGv++JjiV Mx0w==
MIME-Version 1.0
X-Received by 10.42.43.199 with SMTP id y7mr11592608ice.12.1431360473799; Mon, 11 May 2015 09:07:53 -0700 (PDT)
In-Reply-To <miqjoa$17d$1@ger.gmane.org>
References <mailman.49.1430633046.12865.python-list@python.org> <66312d54-de5a-4015-99b5-41d332559e00@googlegroups.com> <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>
Date Tue, 12 May 2015 02:07:53 +1000
Subject Re: code blocks
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.374.1431360482.12865.python-list@python.org> (permalink)
Lines 53
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1431360482 news.xs4all.nl 2851 [2001:888:2000:d::a6]:47933
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:90407

Show key headers only | View raw


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']

Whatever. I've made a few messes on this system, maybe I broke
something somewhere. 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.

ChrisA

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