2017-10-20 8:52 GMT+02:00 Gabriele Battaglia <iz4...@libero.it>:

> Al metodo __str__ di un oggetto, รจ possibile passare dei parametri?
>
No, ma potresti usare __format__()

https://docs.python.org/3/library/stdtypes.html#str.format
https://docs.python.org/3/library/string.html#formatspec
https://pyformat.info/#custom_1
https://gist.github.com/drmalex07/d80643716263bb18f346

-- 
| Raffaele Salmaso
| https://salmaso.org
| https://bitbucket.org/rsalmaso
| https://github.com/rsalmaso
_______________________________________________
Python mailing list
Python@lists.python.it
https://lists.python.it/mailman/listinfo/python

Rispondere a