GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 8.3. collections — Container datatypes · Issue #76163 · python/cpython

8.3. collections — Container datatypes #76163

New issue
Copy link
New issue
Copy link
Closed
Closed
8.3. collections — Container datatypes#76163
Copy link
Assignees
rhettinger
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir

Description

catchmonster
mannequin
opened on Nov 8, 2017
Issue body actions
BPO 31982
Nosy @rhettinger, @csabella, @catchmonster, @miss-islington
PRs
  • bpo-31982: Improve sequence of presentation in ChainMap docs #11960
  • [3.7] bpo-31982: Improve sequence of presentation in ChainMap docs (GH-11960) #11961
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/rhettinger'
    closed_at = <Date 2019-02-20.22:25:43.592>
    created_at = <Date 2017-11-08.16:10:51.930>
    labels = ['docs']
    title = '8.3. collections \xe2\x80\x94 Container datatypes'
    updated_at = <Date 2019-02-20.22:25:43.592>
    user = 'https://github.com/catchmonster'

    bugs.python.org fields:

    activity = <Date 2019-02-20.22:25:43.592>
    actor = 'rhettinger'
    assignee = 'rhettinger'
    closed = True
    closed_date = <Date 2019-02-20.22:25:43.592>
    closer = 'rhettinger'
    components = ['Documentation']
    creation = <Date 2017-11-08.16:10:51.930>
    creator = 'Sasha Kacanski'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 31982
    keywords = ['patch']
    message_count = 6.0
    messages = ['305876', '305903', '305905', '334307', '336152', '336153']
    nosy_count = 5.0
    nosy_names = ['rhettinger', 'docs@python', 'cheryl.sabella', 'Sasha Kacanski', 'miss-islington']
    pr_nums = ['11960', '11961']
    priority = 'low'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue31982'
    versions = ['Python 3.6']

    Activity

    1. catchmonster commented on Nov 8, 2017

      @catchmonster
      catchmonstermannequin
      on Nov 8, 2017
      MannequinAuthor
      More actions

      Hi,
      In ChainMap example
      c = ChainMap() # Create root context
      d = c.new_child() # Create nested child context
      e = c.new_child() # Child of c, independent from d
      e.maps[0] # Current context dictionary -- like Python's locals()
      e.maps[-1] # Root context -- like Python's globals()
      e.parents # Enclosing context chain -- like Python's nonlocals

      d['x'] # Get first key in the chain of contexts
      d['x'] = 1 # Set value in current context

      d['x'] - will raise key does not exist error

      so simple fix is to flip last two lines...

      I know, possibly anal but look love Python and would like to help new folks to not get confused if they play with example in cPython shell...

      --best

    2. catchmonster
      assigned
      docspython
      on Nov 8, 2017
    3. catchmonster
      added
      docsDocumentation in the Doc dirDocumentation in the Doc dir
      on Nov 8, 2017
    4. rhettinger commented on Nov 8, 2017

      @rhettinger
      rhettinger
      on Nov 8, 2017
      Contributor
      More actions

      I will flip the two because there is not downside. However, the table of wasn't intended to be a sequential example (that's why there is no data or display of result). Instead, it was just meant to be table of typing-this-does-that.

    5. rhettinger
      assigned
      rhettinger
      and unassigned
      docspython
      on Nov 8, 2017
    6. catchmonster commented on Nov 8, 2017

      @catchmonster
      catchmonstermannequin
      on Nov 8, 2017
      MannequinAuthor
      More actions

      Agree, and I know.

      On Nov 8, 2017 3:41 PM, "Raymond Hettinger" <[email protected]> wrote:

      Raymond Hettinger <[email protected]> added the comment:

      I will flip the two because there is not downside. However, the table of
      wasn't intended to be a sequential example (that's why there is no data or
      display of result). Instead, it was just meant to be table of
      typing-this-does-that.

      ----------
      assignee: docs@python -> rhettinger
      nosy: +rhettinger
      priority: normal -> low


      Python tracker <[email protected]>
      <https://bugs.python.org/issue31982\>


    7. csabella commented on Jan 24, 2019

      @csabella
      csabella
      on Jan 24, 2019
      Contributor
      More actions

      This is a duplicate of bpo-31075, which was closed as 'Not a bug'.

    8. miss-islington commented on Feb 20, 2019

      @miss-islington
      miss-islington
      on Feb 20, 2019
      Contributor
      More actions

      New changeset 9b0c681 by Miss Islington (bot) (Raymond Hettinger) in branch 'master':
      bpo-31982: Improve sequence of presentation in ChainMap docs (GH-11960)
      9b0c681

    9. rhettinger commented on Feb 20, 2019

      @rhettinger
      rhettinger
      on Feb 20, 2019
      Contributor
      More actions

      New changeset 14baf06 by Raymond Hettinger (Miss Islington (bot)) in branch '3.7':
      bpo-31982: Improve sequence of presentation in ChainMap docs (GH-11960) (GH-11961)
      14baf06

    10. rhettinger
      closed this as completedon Feb 20, 2019
    11. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    • @rhettinger
      rhettinger

    Labels

    docsDocumentation in the Doc dirDocumentation in the Doc dir

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.