Thanks for the summary!  I think something like this should go into the
manual as it is not particularly clear...

On Mon, 2015-03-30 at 17:09, [email protected] wrote:
> I think I've got my head pretty much wrapped around all of this.  I figured 
> I'd recap just in case anyone else comes across any of the issues discussed.
>
> import DataFrames   # Like "import DataFrames" in Python, requires 
> DataFrames.foo for all methods
>
> using DataFrames    # Like "import DataFrames; from DataFrames import *" in 
> Python, imports all exported methods
>
> import DataFrames: nrow  # Like "import DataFrames; from DataFrames import 
> nrow" in Python
>
> # The last line above is the only way to add methods to an existing 
> function without explicitly specifying 
> # the module name (e.g., DataFrames.nrow(s::String) = ...).  For example, 
> this works:
>
> import DataFrames: nrow
> nrow(s::String) = display("Hello " * s)
>
> # But this doesn't (you will get an error that DataFrames.nrow must be 
> explicitly imported to be extended):
>
> using DataFrames
> nrow(s::String) = display("Hello " * s)

Reply via email to