Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > fr.comp.lang.python > #3830

Re: Présentation propre d'une interpolation.

Path csiph.com!news.mixmin.net!aioe.org!ZdDiA78OpGiAUPu/soa7tQ.user.46.165.242.91.POSTED!not-for-mail
From Dominique <zzz@aol.com.invalid>
Newsgroups fr.comp.lang.python
Subject Re: Présentation propre d'une interpolation.
Date Sun, 1 May 2022 21:45:57 +0200
Organization Aioe.org NNTP Server
Message-ID <t4mo1l$100c$1@gioia.aioe.org> (permalink)
References <t4m9ft$f1g$1@gioia.aioe.org> <87a6c13xqq.fsf@izac.org>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
Injection-Info gioia.aioe.org; logging-data="32780"; posting-host="ZdDiA78OpGiAUPu/soa7tQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1
Content-Language fr
X-Notice Filtered by postfilter v. 0.9.2
Xref csiph.com fr.comp.lang.python:3830

Show key headers only | View raw


Le 01/05/2022 à 20:37, Benoit Izac a écrit :

> Réponse à la première question :
> 
>>>> import pprint
>>>> pprint.pprint(res)
> (['x1 ', 12.456, 'y1 ', 12.96524],
>   ['x ', 13.4587, 'y ', 13.223527289798024],
>   ['x2 ', 18.6548, 'y2 ', 14.562])
> 
Bon, j'ai déjà appris pprint. Merci :-)

> Pour la deuxième, c'est beaucoup plus compliqué, il faudrait créer une
> classe et implémenter « __str__ » pour faire ce que tu veux (avec des
> f-strings par exemple).
> 

Là, ça va dépasser mes petites connaissances. Je vais repousser à plus tard.

Merci encore pour le pprint,

Dominique

Back to fr.comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Présentation propre d'une interpolation. Dominique <zzz@aol.com.invalid> - 2022-05-01 17:37 +0200
  Re: Présentation propre d'une interpolation. Benoit Izac <use.reply.to@INVALID.ADDRESS> - 2022-05-01 20:37 +0200
    Re: Présentation propre d'une interpolation. Dominique <zzz@aol.com.invalid> - 2022-05-01 21:45 +0200
      Re: Présentation propre d'une interpolation. Nicolas <nicolasp@aaton.com> - 2022-05-02 09:24 +0200

csiph-web