ENH: make correct python variable names #314

Merged
merged 2 commits into from Jun 19, 2012

Conversation

Projects
None yet
2 participants
Owner

jseabold commented Jun 13, 2012

Make correct python variable names

> name <- "I am a Pr(<10).R name"
> sanitize_name(name)
[1] "I_am_a_Pr10_R_name"
Owner

josef-pkt commented Jun 13, 2012

This doesn't work at that location, at least not without being able to turn it off.

sanitize is done around line 36, after that I construct the python name, which can have dots in it for attributes, e.g.
sur.equ1.params sur.equ1. would be given as a prefix argument.
That version should be replaced by the new enhanced version of sanitize.

one option if you want to call mkarray2 directly: create keyword argument in mkarray2 that allows turning off sanitize.
But it might be easier just to call cat_items with a named list to use mkarray2 indirectly, I think.

Owner

jseabold commented Jun 13, 2012

Oh I didn't see that you were also using mkarray2 in cat_items

Owner

jseabold commented Jun 13, 2012

I fixed it to be optional not default. I'm just extending it for my current needs.

Owner

josef-pkt commented Jun 13, 2012

Now that I figured out how to do this, I want to make it into functions that can be used in many or most regular cases, without having to know or remember any R details.

Owner

jseabold commented Jun 19, 2012

Ok to merge?

Owner

josef-pkt commented Jun 19, 2012

fine with me.

@jseabold jseabold added a commit that referenced this pull request Jun 19, 2012

@jseabold jseabold Merge pull request #314 from statsmodels/topy-r-names
ENH: make correct python variable names in topy.R
af26395

@jseabold jseabold merged commit af26395 into master Jun 19, 2012

@PierreBdR PierreBdR pushed a commit to PierreBdR/statsmodels that referenced this pull request Sep 2, 2014

@jseabold jseabold Merge pull request #314 from statsmodels/topy-r-names
ENH: make correct python variable names in topy.R
41ddad8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment