Deutsch   English   Français   Italiano  
<v4tr8c$1qoda$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: David Brown <david.brown@hesbynett.no>
Newsgroups: comp.lang.c
Subject: Re: Baby X is bor nagain
Date: Wed, 19 Jun 2024 07:44:44 +0200
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <v4tr8c$1qoda$1@dont-email.me>
References: <v494f9$von8$1@dont-email.me>
 <v49seg$14cva$1@raubtier-asyl.eternal-september.org>
 <v49t6f$14i1o$1@dont-email.me>
 <v4bcbj$1gqlo$1@raubtier-asyl.eternal-september.org>
 <v4bh56$1hibd$1@dont-email.me> <v4c0mg$1kjmk$1@dont-email.me>
 <v4c8s4$1lki1$4@dont-email.me> <20240613002933.000075c5@yahoo.com>
 <v4emki$28d1b$1@dont-email.me> <20240613174354.00005498@yahoo.com>
 <v4okn9$flpo$2@dont-email.me> <20240617002924.597@kylheku.com>
 <v4pddb$m5th$1@dont-email.me> <20240618115650.00006e3f@yahoo.com>
 <v4rv0o$1b7h1$1@dont-email.me> <20240618184026.000046e1@yahoo.com>
 <v4sd75$1ed31$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 19 Jun 2024 07:44:45 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="0e1bf1c39b81cc98682be3a9709bb4b3";
	logging-data="1925546"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/7AlbA4EjBk+GTZBdD/xJNYny2rlrPRy4="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:cXit57gpqEUZ5EdPU6e0QxjwSHI=
Content-Language: en-GB
In-Reply-To: <v4sd75$1ed31$1@dont-email.me>
Bytes: 3231

On 18/06/2024 18:39, Malcolm McLean wrote:
> On 18/06/2024 16:40, Michael S wrote:
>> On Tue, 18 Jun 2024 14:36:40 +0200
>> David Brown <david.brown@hesbynett.no> wrote:
>>
>>>
>>> Of course if you don't know Python, it will be slower to write it in
>>> Python!
>>>
>>
>> I don't know Python well, but it does not meant that I don't know it at
>> all.
>> Few minutes ago I took a look into docs and it seems that situation with
>> writing binary data files with predefined layout is better than what I
>> was suspecting. They have something called "Buffer Protocol". It allows
>> to specify layout in declarative manner, similarly to C struct or may
>> be even to Ada's records with representation clause.
>> However attempt to read the doc page further down proved that my
>> suspicion about steepness of the learning curve was not wrong :(
>>
>>
> My main experience of Python was that we had some resource files which 
> were icons, in matching light and dark themes. The light theme had 
> suffix _L followed by extension, and the dark themes had _D. And they 
> needed to be sorted alphabetically, except that _L should be placed 
> before _D.
> And it didn't take long to get Python to sort the list alphabetically, 
> but there seemed no way in to the sort comparision function itself. And 
> I had to give up.
> 

Python "sort" is a bit like C "qsort" (desperately trying to relate this 
to the group topicality) in that you can define your own comparison 
function, and use that for "sort".  For simple comparison functions, 
people often use lambdas, for more complicated ones it's clearer to 
define a function with a name.