Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Bernardo Sulzbach Newsgroups: comp.lang.python Subject: Re: subscripting Python 3 dicts/getting the only value in a Python 3 dict Date: Tue, 12 Jan 2016 17:12:32 -0200 Lines: 4 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de 9dB7+CjW55jFWNMk62L3VwWQbmlGJO98hM3InTjIy16w== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.167 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.68; '*S*': 0.01; 'subject:Python': 0.05; 'subject:getting': 0.07; 'received:io': 0.16; 'received:psf.io': 0.16; 'header:In-Reply-To:1': 0.24; 'message-id:@mail.gmail.com': 0.27; 'subject:/': 0.30; 'another': 0.32; 'list': 0.34; 'received:google.com': 0.35; 'too': 0.36; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:209': 0.38; 'subject:the': 0.39; 'to:addr:python.org': 0.40; 'still': 0.40; 'skip:n 10': 0.62; 'making': 0.62; 'intent': 0.66; 'course.': 0.67; 'answer.': 0.72; 'saw': 0.77; 'subject:value': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=nhui26fYnd8NTJb4b4BRSA8agtej6tbfP5+zSgM1UuI=; b=x1fBKP0vmWviaNJWW0WVGBwj2v+ZKffvdKSPdzEVnGbX4YMtvbCevRpWhxtet0bukB SoD1jQ2Dp17IVaBXPiIiw4Ef6+VDV76oABjxzeZN6ggsV+4zic9A9o6+s4ZfeBozpwHy orYCZQLRGq9NMqXyogDKQl3mVRGquPwi0390W0ZFv1S7AunAzftVazmrnwatQQALbE55 DopW5s9+fyntxFXfh6bzgSL9abt/ATsVPA24T+m4u8RGRhpDO0ytbFEhitNsnVuzpYD+ HkGW3DV6J6KjJUND1uFBi+EinLSjB+Q+yw0+edOyEC3JnK/0yEpQKqD1cIvLpYMb98QQ AAxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=nhui26fYnd8NTJb4b4BRSA8agtej6tbfP5+zSgM1UuI=; b=esgjwi+C3jWImj9Y0STD93nBaY/HxemCGt+EkOHU/gTS5Ng8sd0wCoJCGbCHsUBhh8 3px+dwcPQIpeRd9IHtgxQtVnnwGqrnbVV1Z0K91nOlPM5HZfAziY/iS97JDBcPDsGZeB 6fDdYZYYV6tNIH/QjSe9DqOLVKi+H5E09vr1YhbDg8zIJMsXLOki+8T+tTZuMLosYvY8 2HS+hVYYPyouzA4UZ6WvtBCvD8T+GKtqF+J7kTh1eSxM7FB9Lsi4wrfcYRtQX/yx5hrW ZByj0zDiqDTXyshdUQKuAPgOIyzoyyYugudvZVIHQoWWHifuSTWgxba7JWIFld1t5pRc 1Iwg== X-Gm-Message-State: ALoCoQmJ9rPcIMSrDsjSVW6fM+kNstrEJoIFMqmEE/FtNrN4UquuWkRqHGADiRTfmfSeH0lyUbfnnjWPVbWjNVIHWNZX+VijJQ== X-Received: by 10.25.209.80 with SMTP id i77mr42457255lfg.33.1452625991621; Tue, 12 Jan 2016 11:13:11 -0800 (PST) In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:101570 I saw it in another answer. next(iter(d)) is still the winner. This resembles a list just too much, making the coder's intent harder to understand. This is **very** subjective, of course.