Re: ports mit Doppelpunkt nach docker-compose schreiben

Marco Bakera <[email protected]>
Newsgroups gmane.comp.python.general.german
Message-ID <[email protected]>
Lars Liedtke wrote on 22.10.20 18:31:
> 
> ich finde
> 
> docker_compose["services"]["app"]["ports"] = [f"{str(ext_port)}:80"]
> 
> schöner, das ist aber rein persönliches Empfinden. Aber vielleicht hilft
> Dir das trotzdem. Schau mal nach f-strings.

Ein guter Hinweis. Innerhalb der f-strings muss noch nicht einmal
konvertiert werden:

docker_compose["services"]["app"]["ports"] = [f"{ext_port}:80"]



Marco.

-- 
k=bytes.fromhex('b90155033ce5a85fa989ed1d3adeaa6c82');c=bytes.fromhex('c9683b775184c61fcbe8867848bf8408e7');print(''.join([chr(c^k)for
c,k in zip(c,k)]))
_______________________________________________
python-de maillist  -  [email protected]
https://mail.python.org/mailman/listinfo/python-de
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.