Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
using f-strings instead of % operator
  • Loading branch information
abbassix authored Sep 29, 2023
commit 166a388ac84cbdea1c27404acfe1453c7bb6eb51
2 changes: 1 addition & 1 deletion 01-data-model/data-model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@
" self.y = y\n",
"\n",
" def __repr__(self):\n",
" return 'Vector(%r, %r)' % (self.x, self.y)\n",
" return f'Vector({self.x!r}, {self.y!r})'\n",
"\n",
" def __abs__(self):\n",
" return math.hypot(self.x, self.y)\n",
Expand Down