New answers tagged

3

Instead of always manually parsing sys.argv, you can use the standard library tool argparse. It automatically enforces the right usage and prints a nicely formatted usage if not. For your given example it would look like this: import argparse def ip_address(ip): # TODO: implement checking if IP is valid return ip def parse_args(args=None): ...


2

Few things, Your properties should be all set to readonly as you need to enforce your class requirements. You can make them public, but with a private set;. or simply { get; }. TcpClient is a main requirement in this class, and you didn't setup the class constructor correctly for that purpose. Because of that, you were constructing inside Connect(). For ...


Top 50 recent answers are included