Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 166a388

Browse filesBrowse files
authored
using f-strings instead of % operator
1 parent 28d6d03 commit 166a388
Copy full SHA for 166a388

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎01-data-model/data-model.ipynb

Copy file name to clipboardExpand all lines: 01-data-model/data-model.ipynb
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@
482482
" self.y = y\n",
483483
"\n",
484484
" def __repr__(self):\n",
485-
" return 'Vector(%r, %r)' % (self.x, self.y)\n",
485+
" return f'Vector({self.x!r}, {self.y!r})'\n",
486486
"\n",
487487
" def __abs__(self):\n",
488488
" return math.hypot(self.x, self.y)\n",

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.