LaurentCR / pylast

Automatically exported from code.google.com/p/pylast
Apache License 2.0
0 stars 0 forks source link

add_tags has unnecessary and harmful *args magic #52

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This breaks when passing in a list:

    def add_tags(self, *tags):

I would much prefer:

    def add_tags(self, tags):

which makes it implicit that a list has to be passed in (since add_tags is 
plural, it's the expected semantics.) If a method to set a single tag is 
desired, there is no reason I can see that _add_tag should not be public.

Original issue reported on code.google.com by thisfred@gmail.com on 4 Jan 2011 at 6:58

GoogleCodeExporter commented 9 years ago
Same goes for set_tags, btw.

Original comment by thisfred@gmail.com on 4 Jan 2011 at 7:05

GoogleCodeExporter commented 9 years ago
Alrighty then. I'm already bumping the version to 0.5, we might as well 
introduce a little API breakage.

Original comment by amr.hassan on 5 Jan 2011 at 6:45

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r231.

Original comment by amr.hassan on 5 Jan 2011 at 6:48

GoogleCodeExporter commented 9 years ago
Awesome thanks!

Original comment by thisfred@gmail.com on 5 Jan 2011 at 1:56