Skip to content

Commit

Permalink
Assume Python 3 and write string without u prefix
Browse files Browse the repository at this point in the history
Python 3 is well established. We can write example string literals without the u prefix.
  • Loading branch information
EdwardBetts authored Nov 17, 2018
1 parent cedad54 commit 472513f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,26 +53,26 @@ In order to make your models versioned you need two things:
content = sa.Column(sa.UnicodeText)
article = Article(name=u'Some article', content=u'Some content')
article = Article(name='Some article', content='Some content')
session.add(article)
session.commit()
# article has now one version stored in database
article.versions[0].name
# u'Some article'
# 'Some article'
article.name = u'Updated name'
article.name = 'Updated name'
session.commit()
article.versions[1].name
# u'Updated name'
# 'Updated name'
# lets revert back to first version
article.versions[0].revert()
article.name
# u'Some article'
# 'Some article'
Resources
Expand Down

0 comments on commit 472513f

Please sign in to comment.