From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id A302F138A2F for ; Sat, 23 Aug 2014 19:03:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2CE08E0974; Sat, 23 Aug 2014 19:03:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B069EE0974 for ; Sat, 23 Aug 2014 19:03:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CB2053402AB for ; Sat, 23 Aug 2014 19:03:11 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9D4923C42 for ; Sat, 23 Aug 2014 19:03:05 +0000 (UTC) From: "André Erdmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" Message-ID: <1408814393.cb26f0710d0b0559fb0e596e78d308c015c508da.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/util/ X-VCS-Repository: proj/R_overlay X-VCS-Files: roverlay/util/dictwalk.py roverlay/util/objects.py X-VCS-Directories: roverlay/util/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: cb26f0710d0b0559fb0e596e78d308c015c508da X-VCS-Branch: master Date: Sat, 23 Aug 2014 19:03:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 99d1c914-ee41-4532-bd3d-c2be5c76e4e1 X-Archives-Hash: 937308f846bf8e07cc6c2292fd64c5fc commit: cb26f0710d0b0559fb0e596e78d308c015c508da Author: André Erdmann mailerd de> AuthorDate: Sat Aug 23 17:19:53 2014 +0000 Commit: André Erdmann mailerd de> CommitDate: Sat Aug 23 17:19:53 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=cb26f071 minor cleanup --- roverlay/util/dictwalk.py | 4 ++-- roverlay/util/objects.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/roverlay/util/dictwalk.py b/roverlay/util/dictwalk.py index 0813d11..9408623 100644 --- a/roverlay/util/dictwalk.py +++ b/roverlay/util/dictwalk.py @@ -30,8 +30,8 @@ def dictmerge ( iterable, dict_cls=dict, get_key=None, get_value=None ): def dictwalk_create_parent_v ( root, path, dict_create=None, cautious=True ): - """Creates a dict tree structure using keys the given path. The last path - element will not be created. + """Creates a dict tree structure using keys from the given path. + The last path element will not be created. Returns a 3-tuple ( , diff --git a/roverlay/util/objects.py b/roverlay/util/objects.py index 9c73749..0f2a2da 100644 --- a/roverlay/util/objects.py +++ b/roverlay/util/objects.py @@ -59,13 +59,13 @@ class SafeWeakRef ( weakref.ref ): def __repr__ ( self ): obj = self.deref_unsafe() - if obj: - return "<{} at 0x{:x} to {!r} at 0x{:x}>".format ( + if obj is not None: + return "<{} at {:#x} to {!r} at {:#x}>".format ( self.__class__.__name__, id ( self ), obj.__class__.__name__, id ( obj ) ) else: - return "<{} at 0x{:x} to None>".format ( + return "<{} at {:#x} to None>".format ( self.__class__.__name__, id ( self ) ) # --- end of __repr__ (...) --- @@ -109,7 +109,7 @@ class NoneRef ( object ): __nonzero__ = __bool__ def __repr__ ( self ): - return "".format ( id ( self ) ) + return "".format ( id ( self ) ) # --- end of __repr__ (...) --- # --- end of NoneRef ---