Use map for string casts in Stream.filter
authorHarmon <Harmon758@gmail.com>
Sun, 21 Feb 2021 21:43:45 +0000 (15:43 -0600)
committerGitHub <noreply@github.com>
Sun, 21 Feb 2021 21:43:45 +0000 (15:43 -0600)
tweepy/streaming.py

index c98fab9ba82a21885bb4efd6b9571edc23ac206d..eed633987a019c3520079440f9141d23bacec881 100644 (file)
@@ -432,10 +432,10 @@ class Stream(object):
         self.url = '/%s/statuses/filter.json' % STREAM_VERSION
 
         if follow:
-            self.body['follow'] = u','.join(str(f) for f in follow).encode(encoding)
+            self.body['follow'] = u','.join(map(str, follow)).encode(encoding)
 
         if track:
-            self.body['track'] = u','.join(str(f) for f in track).encode(encoding)
+            self.body['track'] = u','.join(map(str, track)).encode(encoding)
 
         if locations and len(locations) > 0:
             if len(locations) % 4 != 0: