[Modeling-users] patch : Entity.externalNameForInternalName()
Status: Abandoned
Brought to you by:
sbigaret
|
From: Yannick G. <yan...@sa...> - 2003-06-09 19:17:34
|
=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,=20
I use Entity.externalNameForInternalName() and
Entity.nameForExternalName() extensivly to reload phpMyAdmin XML dumps of m=
y=20
database. Both should be 100% reversible so I submit this patch :=20
=2D --- Entity.py.orig 2003-06-09 15:11:57.000000000 -0400
+++ Entity.py 2003-06-09 15:12:16.000000000 -0400
@@ -70,7 +70,7 @@
#If 'returnCaps' is set to '0', the returned string consists of lower ca=
se
#letters, instead of upper case ones.
#if useCaps:
=2D - _regexp=3Dre.compile('([a-z])([A-Z])')
+ _regexp=3Dre.compile('([a-z0-9])([A-Z])')
_results=3D_regexp.sub('\\1'+separatorString+'\\2', aName)
#else:
# _results=3DaName
In short, when the word is broken after a number, the '_' is not restored b=
y=20
externalNameForInternalName().
ex :=20
db2_id -> db2Id -> db2id
=2D --=20
Yannick Gingras
Byte Gardener, Savoir-faire Linux inc.
(514) 276-5468
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+5N14rhy5Fqn/MRARAkYbAJoCWoCnI+cvJcQwdDTROvoL3NNLagCdEeAG
c8O+RMQ11iS0QIh/DoT9wqs=3D
=3D1GcE
=2D----END PGP SIGNATURE-----
|