View Single Post
Old 01-23-2011, 05:05 AM   #75
pchrist7
Addict
pchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animals
 
pchrist7's Avatar
 
Posts: 385
Karma: 6514
Join Date: Aug 2010
Location: Denmark
Device: Kindle 3 3G+Wifi, Oasis
Quote:
Originally Posted by chaley View Post
You have stumbled across a python'ism. Printing object instances requires class-level support. The class must include some special methods that return a string representation of an instance of the class. SR match objects don't, so you need to make do with its API. For example, you can print mg.groups(), which will give you a list of all the matched groups. mg.group(0) will give you the entire matched string.
Brilliant ! Thank you so much !
That will make this a lot easier in times to come ;-D
pchrist7 is offline   Reply With Quote