Where/how to propose an addition to a standard module?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Joe Strout

    Where/how to propose an addition to a standard module?

    I would like to propose a new method for the string.Template class.
    What's the proper procedure for doing this? I've joined the python-
    ideas list, but that seems to be only for proposed language changes,
    and my idea doesn't require any change to the language at all.

    From <http://www.python.org/dev/peps/pep-0001/>, it sounds like the
    PEP process is appropriate here, though other PEPs (like <http://www.python.org/dev/peps/pep-3001/
    make it sound as though these are meant for proposals for "Python
    3000", which is not necessarily my intent.

    Here's a brief sketch of my proposal, in case it helps:

    Add a "match" function to string.Template , which takes a text string
    as a parameter. If this text string can be matched to the template,
    by substituting some portion of the given string for each field of the
    template, then .match returns a dictionary, where each key is a field
    name and the value is the corresponding text from the input. If the
    text string cannot be matched to the template, then .match returns None.

    I understand that if I'm to write a PEP, I'll need to flesh this out
    considerably as per PEP 0001. But that document also suggests first
    discussing it here. I'm still a newbie (or actually, oldbie-turned-
    nonbie-turned-newbie-again), so I could use some advice. What's the
    next step in advocating for this idea?

    Thanks,
    - Joe



  • Aaron \Castironpi\ Brady

    #2
    Re: Where/how to propose an addition to a standard module?

    On Oct 10, 2:10 pm, Joe Strout <j...@strout.ne twrote:
    I would like to propose a new method for the string.Template class.  
    What's the proper procedure for doing this?  I've joined the python-
    ideas list, but that seems to be only for proposed language changes,  
    and my idea doesn't require any change to the language at all.
    >
     From <http://www.python.org/dev/peps/pep-0001/>, it sounds like the  
    PEP process is appropriate here, though other PEPs (like <http://www.python.org/dev/peps/pep-3001/
     make it sound as though these are meant for proposals for "Python  
    3000", which is not necessarily my intent.
    >
    Here's a brief sketch of my proposal, in case it helps:
    >
    Add a "match" function to string.Template , which takes a text string  
    as a parameter.  If this text string can be matched to the template,  
    by substituting some portion of the given string for each field of the  
    template, then .match returns a dictionary, where each key is a field  
    name and the value is the corresponding text from the input.  If the  
    text string cannot be matched to the template, then .match returns None.
    >
    I understand that if I'm to write a PEP, I'll need to flesh this out  
    considerably as per PEP 0001.  But that document also suggests first  
    discussing it here.  I'm still a newbie (or actually, oldbie-turned-
    nonbie-turned-newbie-again), so I could use some advice.  What's the  
    next step in advocating for this idea?
    >
    Thanks,
    - Joe
    I think it's something the 're' module already does. Correct me if
    I'm wrong.

    Comment

    • pruebauno@latinmail.com

      #3
      Re: Where/how to propose an addition to a standard module?

      On Oct 10, 3:10 pm, Joe Strout <j...@strout.ne twrote:
      I would like to propose a new method for the string.Template class.
      What's the proper procedure for doing this? I've joined the python-
      ideas list, but that seems to be only for proposed language changes,
      and my idea doesn't require any change to the language at all.
      >
      From <http://www.python.org/dev/peps/pep-0001/>, it sounds like the
      PEP process is appropriate here, though other PEPs (like <http://www.python.org/dev/peps/pep-3001/
      make it sound as though these are meant for proposals for "Python
      3000", which is not necessarily my intent.
      >
      Here's a brief sketch of my proposal, in case it helps:
      >
      Add a "match" function to string.Template , which takes a text string
      as a parameter. If this text string can be matched to the template,
      by substituting some portion of the given string for each field of the
      template, then .match returns a dictionary, where each key is a field
      name and the value is the corresponding text from the input. If the
      text string cannot be matched to the template, then .match returns None.
      >
      I understand that if I'm to write a PEP, I'll need to flesh this out
      considerably as per PEP 0001. But that document also suggests first
      discussing it here. I'm still a newbie (or actually, oldbie-turned-
      nonbie-turned-newbie-again), so I could use some advice. What's the
      next step in advocating for this idea?
      >
      Thanks,
      - Joe
      Whenever I needed such functionality I used the re module. The benefit
      is that it uses unix style regular expression syntax and an egrep/awk/
      perl/ruby user can understand it. You should show a few examples where
      your proposal looks better than just using RE.

      Comment

      Working...