Ian Bicking, el lunes  7 de noviembre a las 11:40 me escribiste:
> Sean Cazzell wrote:
> >Great, I saw your post on CP-dev.  I wonder if Ian would consider
> >transitioning SQLObject?  I know he mentioned earlier that all of his
> >new code (in other projects) is using names_with_underscores.
> 
> I'm not sure how feasible it really is.  It's an annoying transition to 
> make, as it breaks everything, but only *barely* breaks everything. 
> SQLObject generally provides good backward compatibility.  Also, there's 
> quite a bit of indirect documentation out there, little of which is 
> likely to be updated.
> 
> I am changing some names as I reimplement things (like the new joins are 
> ManyToMany and OneToMany), and new functions added will probably be 
> underscore separated (and it's not uncommon that functions and methods 
> have different styles).  But I'm not sure if I can change the naming 
> convention.

It's not that hard to keep both naming conventions to keep backward
compatibility, deprecating the old names, like:

class Something:
        def some_old_method(self):
                pass
        someOldMethod = some_old_method

You can (probably) even add some sort of decorator to someOldMethod to
automatically throw a deprecation warning or something. For example:

class Something:
        def some_old_method(self):
                pass
        someOldMethod = deprecated(some_old_method)

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
 .------------------------------------------------------------------------,
  \  GPG: 5F5A8D05 // F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05 /
   '--------------------------------------------------------------------'
No es malo que en la condición humana exista la mentira. Miente el púber
si quiere ponerla.
        -- Ricardo Vaporeso. Madrid, 1921.

Reply via email to