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. Advertising

  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. Advertising

  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. Advertising

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. chris
    Replies:
    1
    Views:
    393
    Robert Kern
    Jan 20, 2006
  2. Edward K. Ream

    newlines and sax.saxutils.quoteattr

    Edward K. Ream, Sep 19, 2006, in forum: Python
    Replies:
    2
    Views:
    334
    Edward K. Ream
    Sep 19, 2006
  3. Andreas Hasenkopf
    Replies:
    0
    Views:
    235
    Andreas Hasenkopf
    Jun 29, 2011
  4. Eduardo78
    Replies:
    0
    Views:
    265
    Eduardo78
    Nov 3, 2005
  5. Erik Wasser
    Replies:
    5
    Views:
    484
    Peter J. Holzer
    Mar 5, 2006
Loading...

Share This Page