From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 9B7C04C889; Thu, 14 Jan 2021 15:56:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9B7C04C889 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1610629000; bh=W5IHKO9LUDyuTNTPISh3oztwd+OkcHIAKtdo6ZYme+o=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=eo8L7CWtPwWY7cwkJZIJikqwAmV/mdkb5wKy6gSFN/dwlO0qbnpEyB/+DAX8ab0Il hHDYd9EhId7hY052RAPw0YjzyUu7FxwgRzoA5PVd5PMXspCgh+4mAjX4sCcgw0yR8C 0G/sV1SfchUjQMoqgWLDG907Yb7kIaSPkqZ/YjrU= Received: from smtp59.i.mail.ru (smtp59.i.mail.ru [217.69.128.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 1D1F24C885 for ; Thu, 14 Jan 2021 15:56:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1D1F24C885 Received: by smtp59.i.mail.ru with esmtpa (envelope-from ) id 1l02B5-000665-9V; Thu, 14 Jan 2021 15:56:39 +0300 Date: Thu, 14 Jan 2021 15:57:02 +0300 To: Sergey Bronnikov Message-ID: <20210114125702.b4m57d7nen5mzuv3@tkn_work_nb> References: <20210114122307.c6oekoa45vh73hje@tkn_work_nb> <166276bb-8c56-589f-21d2-09eead7091b0@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <166276bb-8c56-589f-21d2-09eead7091b0@tarantool.org> X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9D0E79FBC973162CD1269BAEF2517FA5CABD5EB3486AA6E7100894C459B0CD1B924156DAF2E7B5EB88C35EEB68543090D7E70E0EA0DA2217BF7B622F40FDBB785 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE77603ADE015AF816DEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063753275FB77F6A31628638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FC480310FC876A81A630FD34EBA2A6084E15714717BB3781E8389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C08794E14F7ADDB10D8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6E232F00D8D26902CA471835C12D1D977C4224003CC836476EB9C4185024447017B076A6E789B0E975F5C1EE8F4F765FC4D6DFD11D8C3F533D81D268191BDAD3DBD4B6F7A4D31EC0BEA7A3FFF5B025636D81D268191BDAD3D78DA827A17800CE71FA42B2EB2BE1CBECD04E86FAF290E2D7E9C4E3C761E06A7089D37D7C0E48F6CA18204E546F3947C616AD31D0D18CD5C42539A7722CA490CC8A9BA7A39EFB7666BA297DBC24807EA089D37D7C0E48F6C8AA50765F7900637E6CFFF7AFAFA3B44EFF80C71ABB335746BA297DBC24807EA27F269C8F02392CDC58410348177836E2FE522B81756EA3300306258E7E6ABB4E4A6367B16DE6309 X-C1DE0DAB: 0D63561A33F958A5462A8DA4AB7DEFE42755E79E97D5E4BB502A51544AEECB71D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75448CF9D3A7B2C848410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34D7D5115130EFC824EB260DFBD1FB8408402AD1531BBF1DD02030C05A25E7794E674DA18808311C911D7E09C32AA3244C94262DA6EDBDE1539DF21D5F9BAEE31AF2F5F14F68F1805B927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj9kdO2HH36x6urHnuC2tvPw== X-Mailru-Sender: FFAA8E4AEE17E37C3731A083A1A85ADE24156DAF2E7B5EB88C35EEB68543090DB7EA9FE7735C3DBFC664A44C781FCEA7C77752E0C033A69EDF9F2CE1E9CF805D8CD356D4F938FF726C18EFA0BB12DBB0 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v1 1/4] test: fix app-tap/http_client.test.lua X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Alexander Turenko via Tarantool-patches Reply-To: Alexander Turenko Cc: Sergey Bronnikov , tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On Thu, Jan 14, 2021 at 03:52:06PM +0300, Sergey Bronnikov wrote: > Thanks for review! > > On 14.01.2021 15:23, Alexander Turenko wrote: > > > @@ -76,7 +76,7 @@ def post_handle(env, response): > > > code = "200 OK" > > > body = [env["wsgi.input"].read()] > > > headers = [] > > > - for key,value in env.iteritems(): > > > + for key,value in iter(env.items()): > > AFAIR, .items() forms a list on Python 2, but creates an iterator > > object on Python 3. Both are suitable for the for loop expression and > > there is no much difference when the dictionary in not large. > > Generally it is so. Although PEP-0469 recommends to convert d.items() to > iter(d.iteritems()) [1]. It is the most common way: so if one pass the iterator to some function, which expects an iterator object (but not a list), it'll work. However for most usages (such as in a loop expressions), .items() is enough.