diff --git a/Lib/ftplib.py b/Lib/ftplib.py
index 820c345ee778e07d85e894bd3ac5e0eb2a2a2326..807bc383eeb05cbb8b62f4a0ba180b2322a96b56 100644
--- a/Lib/ftplib.py
+++ b/Lib/ftplib.py
@@ -252,7 +252,7 @@ class FTP:
         port number.
         '''
         hbytes = host.split('.')
-        pbytes = [repr(port/256), repr(port%256)]
+        pbytes = [repr(port//256), repr(port%256)]
         bytes = hbytes + pbytes
         cmd = 'PORT ' + ','.join(bytes)
         return self.voidcmd(cmd)