On Tuesday 09 August 2016 15:37, Chris Angelico wrote:
[...]
>> You can't be too careful with memory management.
>
> Right. Of course, it gets very onerous, so we tend to use a context
> manager instead.
>
> def process(self, stuff):
> with deallocate() as cleanup:
> clea
On Tue, Aug 9, 2016 at 3:20 PM, Steven D'Aprano
wrote:
>> def process(self, stuff):
>> files = self.files
>> files = [] # to save memory
>> files = self.files
>> for file in files:
>> file.process(stuff)
>> return 1
>
> def process(self,
On Tuesday 09 August 2016 13:59, Chris Angelico wrote:
> On Tue, Aug 9, 2016 at 1:46 PM, Rick Johnson
> wrote:
>> On Sunday, August 7, 2016 at 1:54:51 AM UTC-5, Steven D'Aprano wrote:
>>> Seen in the office IRC channel:
>>>
>>>
>>> (13:23:07) fred: near_limit = []
>>> (13:23:07) fred: nea
On Tue, Aug 9, 2016 at 1:46 PM, Rick Johnson
wrote:
> On Sunday, August 7, 2016 at 1:54:51 AM UTC-5, Steven D'Aprano wrote:
>> Seen in the office IRC channel:
>>
>>
>> (13:23:07) fred: near_limit = []
>> (13:23:07) fred: near_limit.append(1)
>> (13:23:07) fred: near_limit = len(near_li
On Sunday, August 7, 2016 at 1:54:51 AM UTC-5, Steven D'Aprano wrote:
> Seen in the office IRC channel:
>
>
> (13:23:07) fred: near_limit = []
> (13:23:07) fred: near_limit.append(1)
> (13:23:07) fred: near_limit = len(near_limit)
> (13:23:09) fred: WTF
Sure, this code smells of naus
On Mon, 8 Aug 2016 08:03 am, Tim Delaney wrote:
> On 7 August 2016 at 16:54, Steven D'Aprano <
> steve+comp.lang.pyt...@pearwood.info> wrote:
>
>> Seen in the office IRC channel:
>>
>>
>> (13:23:07) fred: near_limit = []
>> (13:23:07) fred: near_limit.append(1)
>> (13:23:07) fred: nea
On 7 August 2016 at 16:54, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:
> Seen in the office IRC channel:
>
>
> (13:23:07) fred: near_limit = []
> (13:23:07) fred: near_limit.append(1)
> (13:23:07) fred: near_limit = len(near_limit)
> (13:23:09) fred: WTF
>
Assuming
On Sun, Aug 7, 2016 at 4:54 PM, Steven D'Aprano
wrote:
> Seen in the office IRC channel:
>
>
> (13:23:07) fred: near_limit = []
> (13:23:07) fred: near_limit.append(1)
> (13:23:07) fred: near_limit = len(near_limit)
> (13:23:09) fred: WTF
>
>
>
> Speaks for itself.
The Real WTF is tha
Seen in the office IRC channel:
(13:23:07) fred: near_limit = []
(13:23:07) fred: near_limit.append(1)
(13:23:07) fred: near_limit = len(near_limit)
(13:23:09) fred: WTF
Speaks for itself.
--
Steve
--
https://mail.python.org/mailman/listinfo/python-list