We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
int
1 parent 5d6ff6c commit 4782275Copy full SHA for 4782275
CHANGES/1259.misc.rst
@@ -0,0 +1 @@
1
+Improved performance of constructing query strings with ``int`` values -- by :user:`bdraco`.
yarl/_url.py
@@ -1280,6 +1280,8 @@ def _query_var(v: QueryVariable) -> str:
1280
if TYPE_CHECKING:
1281
assert isinstance(v, str)
1282
return v
1283
+ if cls is int: # Fast path for non-subclassed int
1284
+ return str(v)
1285
if issubclass(cls, float):
1286
1287
assert isinstance(v, float)
0 commit comments