Move xml.sax.saxutils.*?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • chris.atlee@gmail.com

    #1

    Move xml.sax.saxutils.*?

    It seems like functions such as xml.sax.saxutil s.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

  • Martin v. Löwis

    #2
    Re: Move xml.sax.saxutil s.*?

    chris.atlee@gma il.com wrote:[color=blue]
    > It seems like functions such as xml.sax.saxutil s.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?[/color]

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

    The precise details are best discussed at xml-sig@python.org. 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

    Comment

    • uche.ogbuji@gmail.com

      #3
      Re: Move xml.sax.saxutil s.*?

      """
      It seems like functions such as xml.sax.saxutil s.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/

      Comment

      Working...