using f-strings instead of % operator
This commit is contained in:
1 parent
28d6d03315
commit
166a388ac8
1 file changed
+1
-1
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user