On Wed, Sep 30, 2009 at 4:59 PM, Laurent Gautier <lgaut...@gmail.com> wrote: > > Peter wrote: >> >> Can you do something like check if example_name is a valid argument >> for the function at run time, and if not, check example.name instead? >> Would this impose too high a performance cost? >> >> I agree this won't cover the special case of a function which has >> two arguments which differ only in underscore vs dot, but that is >> very rare corner case (surely)? > > I welcome all proposal, but I'd like to keep users on the safe side by > default as much as possible (starting with "it should not happen... most of > the time" does not seem like the right way to start).
I see your point, but it should be balanced against the desire to make rpy2 easy to use, especially for those of us used to the "." / "_" mapping from rpy1. Ideally I'd like rpy2 to map "arg_name" (in Python code) to either "arg_name" or "arg.name" (when talking to R) as appropriate for the function concerned, but raise an error if both possibilities are defined. That way I continue to use the simple substitution when writing R calls, and only have to worry about these very rare corner cases when due to ambiguity the naive way should raise an exception. I don't know enough about R's introspection to say if this idea is realistic or not. Peter ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list