Change docs to use f-strings

This commit is contained in:
erfanio 2019-10-26 17:19:00 +11:00
parent 8f422d2b5e
commit 07caa44224
7 changed files with 13 additions and 13 deletions

View file

@ -86,7 +86,7 @@ Here is an example model (put this into :file:`models.py`, e.g.)::
self.email = email
def __repr__(self):
return '<User %r>' % (self.name)
return f'<User {self.name!r}>'
To create the database you can use the `init_db` function:
@ -159,7 +159,7 @@ Here is an example table and model (put this into :file:`models.py`)::
self.email = email
def __repr__(self):
return '<User %r>' % (self.name)
return f'<User {self.name!r}>'
users = Table('users', metadata,
Column('id', Integer, primary_key=True),