which OO programming style in R will result readable to a Python programmer?

后端 未结 3 1327
再見小時候
再見小時候 2020-12-28 19:49

I\'m author of the logging package on CRAN, I don\'t see myself as an R programmer, so I tried to make it as code-compatible with the Python standard logging package as I co

3条回答
  •  佛祖请我去吃肉
    2020-12-28 20:18

    Why would you repeat the name? It would be more convenient to pass the log-object directly to the function, ie

    logdebug("test",logger=l)
    # or
    logdebug("test",l)
    

    A bit the way one would use connections in a number of functions. That seems more the R way of doing it I guess.

提交回复
热议问题