edsu / pymarc

process MARC records from Python

Home Page:http://python.org/pypi/pymarc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

documentation bug field.del_subfield vs field.delete_subfield

godmar opened this issue · comments

Documentation doesn't match code, creating confusion for programmers:

def delete_subfield(self, code):
    """
    Deletes the first subfield with the specified 'code' and returns 
    its value:

        field.del_subfield('a')

    If no subfield is found with the specified code None is returned.
    """

Patches welcome. (I mean pull requests)

On Thu, Mar 8, 2012 at 12:20 PM, godmar
reply@reply.github.com
wrote:

Documentation doesn't match code, creating confusion for programmers:

   def delete_subfield(self, code):
       """
       Deletes the first subfield with the specified 'code' and returns
       its value:

           field.del_subfield('a')

       If no subfield is found with the specified code None is returned.
       """


Reply to this email directly or view it on GitHub:
#22

You're kidding, right? I'm asking for a one-line change.

Here's the "patch":

@@
< field.del_subfield('a')

       field.delete_subfield('a')

On Thu, Mar 8, 2012 at 2:28 PM, Ed Summers <
reply@reply.github.com

wrote:

Patches welcome.

On Thu, Mar 8, 2012 at 12:20 PM, godmar
reply@reply.github.com
wrote:

Documentation doesn't match code, creating confusion for programmers:

def delete_subfield(self, code):
"""
Deletes the first subfield with the specified 'code' and returns
its value:

       field.del_subfield('a')

   If no subfield is found with the specified code None is returned.
   """

Reply to this email directly or view it on GitHub:
#22


Reply to this email directly or view it on GitHub:
#22 (comment)

not kidding :-)

On Thu, Mar 8, 2012 at 2:31 PM, godmar
reply@reply.github.com
wrote:

You're kidding, right?  I'm asking for a one-line change.

Here's the "patch":

@@
<            field.del_subfield('a')

           field.delete_subfield('a')

On Thu, Mar 8, 2012 at 2:28 PM, Ed Summers <
reply@reply.github.com

wrote:

Patches welcome.

On Thu, Mar 8, 2012 at 12:20 PM, godmar
reply@reply.github.com
wrote:

Documentation doesn't match code, creating confusion for programmers:

   def delete_subfield(self, code):
       """
       Deletes the first subfield with the specified 'code' and returns
       its value:

           field.del_subfield('a')

       If no subfield is found with the specified code None is returned.
       """


Reply to this email directly or view it on GitHub:
#22


Reply to this email directly or view it on GitHub:
#22 (comment)


Reply to this email directly or view it on GitHub:
#22 (comment)

Ed,

I don't have your git repository pulled. You do. It'd take you less time to
fix your typo in the next distribution than it would take me to pull, fix
it for you, commit and send you a push request.

You're causing real problems. A lot of novice programmers learn Python in
library school. They're told to use pymarc. They install the distribution
package and use pydoc. They don't know that they can look at the .py code
on their machine or online. They're lost and wasting time trying to figure
out how to delete a subfield. I'm not speaking hypothetically - that's
exactly what happened to one of our staff members.

  • Godmar

On Thu, Mar 8, 2012 at 3:12 PM, Ed Summers <
reply@reply.github.com

wrote:

not kidding :-)

On Thu, Mar 8, 2012 at 2:31 PM, godmar
reply@reply.github.com
wrote:

You're kidding, right? I'm asking for a one-line change.

Here's the "patch":

@@
< field.del_subfield('a')

       field.delete_subfield('a')

On Thu, Mar 8, 2012 at 2:28 PM, Ed Summers <
reply@reply.github.com

wrote:

Patches welcome.

On Thu, Mar 8, 2012 at 12:20 PM, godmar
reply@reply.github.com
wrote:

Documentation doesn't match code, creating confusion for programmers:

def delete_subfield(self, code):
"""
Deletes the first subfield with the specified 'code' and
returns
its value:

       field.del_subfield('a')

   If no subfield is found with the specified code None is

returned.
"""


Reply to this email directly or view it on GitHub:
#22


Reply to this email directly or view it on GitHub:
#22 (comment)


Reply to this email directly or view it on GitHub:
#22 (comment)


Reply to this email directly or view it on GitHub:
#22 (comment)

please take the time to learn the tools

On Thu, Mar 8, 2012 at 3:18 PM, godmar
reply@reply.github.com
wrote:

Ed,

I don't have your git repository pulled. You do. It'd take you less time to
fix your typo in the next distribution that it would take me to pull, fix
it for you, commit and send you a push request.

You're causing real problems. A lot of novice programmers learn Python in
library school. They're told to use pymarc. They install the distribution
package and use pydoc. They don't know that they can look at the .py code
on their machine or online.  They're lost and wasting time trying to figure
out how to delete a subfield. I'm not speaking hypothetically - that's
exactly what happened to one of our staff members.

 - Godmar

On Thu, Mar 8, 2012 at 3:12 PM, Ed Summers <
reply@reply.github.com

wrote:

not kidding :-)

On Thu, Mar 8, 2012 at 2:31 PM, godmar
reply@reply.github.com
wrote:

You're kidding, right?  I'm asking for a one-line change.

Here's the "patch":

@@
<            field.del_subfield('a')

           field.delete_subfield('a')

On Thu, Mar 8, 2012 at 2:28 PM, Ed Summers <
reply@reply.github.com

wrote:

Patches welcome.

On Thu, Mar 8, 2012 at 12:20 PM, godmar
reply@reply.github.com
wrote:

Documentation doesn't match code, creating confusion for programmers:

   def delete_subfield(self, code):
       """
       Deletes the first subfield with the specified 'code' and
returns
       its value:

           field.del_subfield('a')

       If no subfield is found with the specified code None is
returned.
       """


Reply to this email directly or view it on GitHub:
#22


Reply to this email directly or view it on GitHub:
#22 (comment)


Reply to this email directly or view it on GitHub:
#22 (comment)


Reply to this email directly or view it on GitHub:
#22 (comment)


Reply to this email directly or view it on GitHub:
#22 (comment)

[ inappropriate comment deleted by original author ]

I didn't see that you had fixed the problem and only saw Ed's demand for a patch and pull request. Thank you for your work.