[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Pulp-list] Argument Names



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

If 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  :)


- -- 
Jay Dobies
RHCE# 805008743336126
Freenode: jdob
http://pulpproject.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNnLPFAAoJEOMmcTqOSQHCsGYIAJ1Jff6jk063C8mTDU5RFtDN
2vNtri/WVU4RQItTsrjrjZJhWkE89hsZwDwv2gMS7GKgvknmkqpvvFsjEiDy/YK0
u9BTJrw85+4U8HhtT7v/7/FMzSoS1+3zl3nYfSTm2tuPsNZ0QESEsT39Z7gUpVNY
aJkB9I00Ezunu5LwjHMYbIA2Axf2NKYgaaGHluWZYvu+2clqMCdUaBKaJoryb5vR
BOPFdku+ymUECQpbIx92/Ivbp9tX4zUyOj0+P2rRfAABWyCbCr1NXwWGcQKbrg4U
p3+056Ue3oGYh+0oN5MDYIOPmDyO++nE2oza8IRsWGB3scP/mJyOUnMn+aT9+20=
=8lFG
-----END PGP SIGNATURE-----


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]