Examples using format with attributes of objects


This is also a rather strange example, I don't think I'd use it in real code.


examples/format/formatted_attributes.py
import sys

print("{0.executable}".format(sys))
print("{system.argv[0]}".format(system = sys))

/home/gabor/venv3/bin/python
formatted_attributes.py