Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kLxQQ-0006Ah-PQ for psycopg@arkaria.postgresql.org; Fri, 25 Sep 2020 23:46:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kLxQP-0002bf-O0 for psycopg@arkaria.postgresql.org; Fri, 25 Sep 2020 23:46:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kLxQO-0002bY-1j for psycopg@lists.postgresql.org; Fri, 25 Sep 2020 23:46:49 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kLxQJ-0007Tn-7y for psycopg@lists.postgresql.org; Fri, 25 Sep 2020 23:46:46 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 0C3CFB54; Fri, 25 Sep 2020 19:46:40 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 25 Sep 2020 19:46:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=Y f6LG9b2iKAvsvrjEB4+WPZIMAwrVkBTtXNnudbfOPs=; b=HzeQDCSYCU25hxtkm HQaHhBDDXjnz0vGMwD4rssGu56Y0Qir4137A4+JR1GZst0AI02hbaH1MmOi5VtLU BuWQw+ZRWht3XFzdZaFUDG/05ITw8GZMTtjrBFvJFnzPWPpNRAkMUKjR2zIt/iMi RHsKmhmCm5jqo0y8QXuazZ6j5uoe/qLGQcUpv4SjsaJakDBswHsVnIRkaebHqI1H nlULJ7s6weUWpfM9quCkp4DGqZhh3wCQYD/GigBuzcQkz8w45MX5SFP2DCvEHiGY WniIj3Ni5rMsFGWt4MPD0bRI2Ymed7WeGDZ1HY8Ymgzru1k1DdNSprvgONnRAxCU guG3Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=Yf6LG9b2iKAvsvrjEB4+WPZIMAwrVkBTtXNnudbfO Ps=; b=mztsnCkw+vzY3YyzY8xNeGiNvTF5IhwehAYoD5NzG8AUVcj5xLNMXnfCj zErwIZEEOqvyGGoOa2PDJKxcSO9Qh2QKB5y8WOOOqieo8dschdEZ/rz2ayErNeaf L3AGfirQUZZ/CdkubKStR+cB9QH/HDJDPDVbkSwZPAaBGPRiho+SutdKUxiOaj7t K4BUxmCvXR/cbOjPMKOod0z+bQHQx80RK+vUrVCaVC5G1IlG9tahtc7pc680FpCs iLnuyU9YlSbWibagkjhVlTArRBsZ5/2VQ1HjdzR1D4tmvyYL8Wo3E2ncvsIx0ROz 8F5K1eXv2UWMJbQ1OKfv31fTfcHOQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddugddvtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuggftrfgrthhtvghrnhepteejvdetffejuedvleeifeefheeutdfhgfdvhffhhfek vdduveegvdejudefgfevnecukfhppeejhedrudejvddrhedrvdefudenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghv vghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id D2D3D3280059; Fri, 25 Sep 2020 19:46:39 -0400 (EDT) Subject: Re: iterating over DictRow To: Karsten Hilbert , psycopg@lists.postgresql.org References: <20200923215444.GA25406@hermes.hilbert.loc> <20200924211147.GA2089@hermes.hilbert.loc> <9f9f7536-9d5f-d95b-b1eb-eed7ec1b83f6@aklaver.com> <20200925074820.GC2138@hermes.hilbert.loc> <4975719e-8981-c2ff-1408-c348730b31c5@aklaver.com> <20200925211635.GA1544@hermes.hilbert.loc> <65a4f678-4c7f-d88b-3709-e0686a561461@aklaver.com> <20200925222523.GB1544@hermes.hilbert.loc> From: Adrian Klaver Message-ID: Date: Fri, 25 Sep 2020 16:46:39 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200925222523.GB1544@hermes.hilbert.loc> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 9/25/20 3:25 PM, Karsten Hilbert wrote: > On Fri, Sep 25, 2020 at 03:19:12PM -0700, Adrian Klaver wrote: > >>> Sure, there's a number of solutions to my immediate problem, >>> the fitting of which is >>> >>> for key in dict(DictRow): >>> >>> That's the best fit because my >>> >>> def _escape_dict(the_dict, ...): >>> >>> was inaptly named. It should have been (and now is) >>> >>> def _escape_dict_like(dict_like, ...): >>> >>> within which >>> >>> dict(dict_like) >>> >>> is quite the thing to do despite having to make something a >>> duck which already nearly quacks like one is somehwat >>> unfortunate. >> >> I'm pretty sure DictRow has had the same behavior for some time so: >> >> Are you migrating from Python 2? > > I did not too long ago. So that explains the error that popped up. > >> Or what changed that made this show up? > > At the very core ? My grandpa was admitted to a hospital :-) Sorry to hear that, it's a trial. > > Karsten > -- > GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B > > -- Adrian Klaver adrian.klaver@aklaver.com