jaraco / irc

Full-featured Python IRC library for Python.
MIT License
392 stars 86 forks source link

connection.whois() does not take single strings #46

Closed jaraco closed 8 years ago

jaraco commented 8 years ago

The connection.whois() method should check to see whether the parameter it was passed was a string or a list and act accordingly.

With a string:

#!python
>>> "WHOIS " + ",".join( "JoshTheEnder" ) 
'WHOIS J,o,s,h,T,h,e,E,n,d,e,r' 

With a list (which i assume is how it's supposed to be done but seems pointless for 1 user):

#!python
>>> "WHOIS " + ",".join( ["JoshTheEnder"] )
'WHOIS JoshTheEnder' 

Suggestion: Making the function check the type of the argument and act accordingly between string and list objects


jaraco commented 8 years ago

Good idea.


Original comment by: Jason R. Coombs

jaraco commented 8 years ago

Use always_iterable on whois command. Fixes #46.

→ <<cset 14e64cfc83c2>>


Original comment by: Jason R. Coombs