Move xml.sax.saxutils.*?

Discussion in 'Python' started by chris.atlee@gmail.com, Nov 25, 2005.

  1. Guest

    It seems like functions such as xml.sax.saxutils.escape and unescape
    are generally useful, and not at all tied to the xml.sax module. Would
    it make sense to move them somewhere else, like to xml?

    I ask because it just took me 20 minutes to figure out how to escape
    entities in python. It's not obvious that this functionality should be
    buried 3 modules deep.

    Cheers,
    Chris
     
    , Nov 25, 2005
    #1
    1. Advertisements

  2. wrote:
    > It seems like functions such as xml.sax.saxutils.escape and unescape
    > are generally useful, and not at all tied to the xml.sax module. Would
    > it make sense to move them somewhere else, like to xml?


    Moving it would be a bad idea. Exposing it elsewhere would be useful.

    The precise details are best discussed at . While this
    is obviously wrong, it is not at all obvious what the right thing to do
    is (it never is when dealing with XML).

    Regards,
    Martin
     
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=, Nov 25, 2005
    #2
    1. Advertisements

  3. Guest

    """
    It seems like functions such as xml.sax.saxutils.escape and unescape
    are generally useful, and not at all tied to the xml.sax module. Would
    it make sense to move them somewhere else, like to xml?
    """

    It would be useful to allow

    from xml import escape, unescape

    But as an alias, rather than a replacement for the current import.

    --
    Uche Ogbuji Fourthought, Inc.
    http://uche.ogbuji.net http://fourthought.com
    http://copia.ogbuji.net http://4Suite.org
    Articles: http://uche.ogbuji.net/tech/publications/
     
    , Nov 29, 2005
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Per Magnus L?vold
    Replies:
    0
    Views:
    1,673
    Per Magnus L?vold
    Nov 15, 2004
  2. Thomas Guetttler
    Replies:
    1
    Views:
    698
    Thomas Guetttler
    Sep 10, 2003
  3. chris
    Replies:
    1
    Views:
    486
    Robert Kern
    Jan 20, 2006
  4. Edward K. Ream

    newlines and sax.saxutils.quoteattr

    Edward K. Ream, Sep 19, 2006, in forum: Python
    Replies:
    2
    Views:
    398
    Edward K. Ream
    Sep 19, 2006
  5. Andreas Hasenkopf
    Replies:
    0
    Views:
    316
    Andreas Hasenkopf
    Jun 29, 2011
  6. Eduardo78
    Replies:
    0
    Views:
    424
    Eduardo78
    Nov 3, 2005
  7. Andrew Tomazos
    Replies:
    2
    Views:
    918
    Nobody
    Dec 12, 2011
  8. Erik Wasser
    Replies:
    5
    Views:
    816
    Peter J. Holzer
    Mar 5, 2006
Loading...