Deutsch   English   Français   Italiano  
<uk51jt$auel$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: Dominique <dominique.sextant@orange.fr.invalid>
Newsgroups: fr.comp.lang.python
Subject: Re: Tricher au scrabble...
Date: Tue, 28 Nov 2023 16:39:41 +0100
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <uk51jt$auel$1@dont-email.me>
References: <uk4fm4$852n$1@dont-email.me>
 <x-20231128122929@ram.dialup.fu-berlin.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 28 Nov 2023 15:39:41 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="f72ac530ae0ac3cf1193ebefc5404b88";
	logging-data="358869"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/BURgFkNDMG5gpxYSCkcI4y24K1x93RBI="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:WfopTf386I3WAp1NFPwKezX6tXM=
In-Reply-To: <x-20231128122929@ram.dialup.fu-berlin.de>
Content-Language: fr
Bytes: 1845

Le 28/11/2023 à 12:30, Stefan Ram a écrit :
> Dominique <dominique.sextant@orange.fr.invalid> writes:
>> del (mot)
> 
>    Tout d'abord, juste une remarque sur ce qui est cité ci-dessus :
> 
>    Au lieu de « del(x) », on peut souvent écrire simplement
>    « del x », sans les parenthèses.
> 
>    Ensuite, on peut souvent remplacer
> 
> x = 1
> print( x )
> del x
> 
>    par
> 
> def ecris_1():
>      x = 1
>      print( x )
> 
> ecris_1()
> 
>    . Cela comprend certes plus de lignes, mais correspond
>    probablement plus au style habituel. La variable « x »
>    n'existe plus non plus après cela.
> 
> 

Effectivement, par une fonction, les variables disparaissent après 
exécution. Merci pour le rappel :)


-- 
Dominique
Esto quod es