On 04/06/2011 02:41 PM, Jay Dobies wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1If you're not going to document your methods, please *at least* use the proper pluralization to indicate when an argument is a list or a single item. This has bitten me twice today: def add_package(self, repoid, packageid): def create(self, id, name, arch, feed=None, symlinks=False, sync_schedule=None, feed_cert_data=None, consumer_cert_data=None, relative_path=None, groupid=None, gpgkeys=None, checksum_type="sha256"): In these examples, "packageid" and "groupid" (yet "repoid" only accepts a single repo) actually expect a list in both cases, despite what the names of the arguments may indicate. The better answer is to actually use @param and @type tags to clue in your callers in the first place :)
Or.. you could use a typed language :) -- bk _______________________________________________ Pulp-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/pulp-list
