[cctbxbb] First svn commit
xtald00d at gmail.com
Thu Apr 18 00:40:27 PDT 2013
Thanks everyone for the feedback. I have never really collaborated on code, so I am in definite need of community opinion on matters of style.
I have changed the method to reflect the present vote of 3:1 for explicit argument lists, and will keep the sentiment in mind in the future. I have also renamed the method as_miller_arrays_dict. I figure the rename is safe because it has only been a couple of hours since I pushed the original code.
On Apr 18, 2013, at 1:10 AM, <Graeme.Winter at diamond.ac.uk> <Graeme.Winter at diamond.ac.uk> wrote:
> If I want to make sense of a function the first thing I do is look at the keyword arguments: if I see "not telling" it does not make the code more usable to me. Of course if the doc strings define exactly what keywords to pass in and what they should do then fair enough: I have not looked closely enough at these examples to comment on the details.
> Unlijke Pavel I would not necessarily write my own though :o)
> Best wishes,
> On 18 Apr 2013, at 07:10, Pavel Afonine wrote:
>> When I look at a function and do not understand what it does given it's name and list of arguments I look no more and write my own. Always. This is because my believe that if the author of that function did not bother to make the interface clear it says something about quality of the job as a whole (to me at least), and I don't have time to take chances or waste it reading more.
>> On 4/17/13 11:02 PM, Nathaniel Echols wrote:
>>> On Wed, Apr 17, 2013 at 10:19 PM, Richard Gildea <rgildea at gmail.com> wrote:
>>>> Also, I would prefer the function arguments to be spelled out explicitly
>>>> without using *args and **kwds, so that I can figure out what arguments it
>>>> takes without having to read through the function source code to figure out
>>>> that internally you are calling self.as_miller_arrays(), and then have to go
>>>> and look up the function arguments for that.
>>> My preference is actually the opposite (I do the same thing quite a
>>> bit in my code), because otherwise there is no guarantee that keyword
>>> arguments added to add_miller_arrays will also be usable with
>>> add_miller_arrays_map. Using *args, **kwds makes the APIs explicitly
>>> the same. (That said, I'm increasing favoring using **kwds alone in
>>> these circumstances.)
>>>> My IDE (WingIDE) shows me the
>>>> function signature in its source assistant and also provides code completion
>>>> for function arguments and keywords. However these won't be of much use when
>>>> functions only list *args and **kwds.
>>> <insert generic snarky vi advocacy here>
>>> cctbxbb mailing list
>>> cctbxbb at phenix-online.org
>> cctbxbb mailing list
>> cctbxbb at phenix-online.org
> This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
> Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
> Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
> Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
> cctbxbb mailing list
> cctbxbb at phenix-online.org
More information about the cctbxbb