# REPL and Source Code Question

**URL:** <https://discourse.julialang.org/t/repl-and-source-code-question/87613>\
**Category:** General Usage\
**Tags:** repl\
**Created:** [September 22, 2022, 2:54am UTC](https://discourse.julialang.org/t/repl-and-source-code-question/87613 "2022-09-22T02:54:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TI36XPro](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ti36xpro/32/33658_2.png) [@TI36XPro](https://discourse.julialang.org/u/TI36XPro)\
**Post date:** [September 22, 2022, 2:54am UTC](https://discourse.julialang.org/t/repl-and-source-code-question/87613/1 "2022-09-22T02:54:03Z")

</div>

Hello,

Often times when I am exploring and building things with a new package I am frequently checking what methods are available in the REPL by doing `? SomeFunc`. It will return something like `# 3 methods for generic function blah` and then show a list of them with the corresponding line numbers in the source.

If there is a specific method I want to see the source for, is it possible print it out in the REPL? If so what command is used?

---

<div class="post-metadata">

**Author:** ![Jollywatt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jollywatt/32/202198_2.png) [@Jollywatt](https://discourse.julialang.org/u/Jollywatt)\
**Post date:** [September 22, 2022, 3:22am UTC](https://discourse.julialang.org/t/repl-and-source-code-question/87613/2 "2022-09-22T03:22:38Z")

</div>

Check out [`methods()`](https://docs.julialang.org/en/v1/base/base/#Base.methods), [`edit()`](https://docs.julialang.org/en/v1/stdlib/InteractiveUtils/#InteractiveUtils.edit-Tuple%7BAny%7D) and [`@edit`](https://docs.julialang.org/en/v1/stdlib/InteractiveUtils/#InteractiveUtils.@edit). They’re super handy!

```julia
julia> methods(println)
# 3 methods for generic function "println":
[1] println(io::IO) in Base at coreio.jl:5
[2] println(io::IO, xs...) in Base at strings/io.jl:73
[3] println(xs...) in Base at coreio.jl:4

julia> ans[3]
println(xs...) in Base at coreio.jl:4

julia> edit(ans) # opens file at relevant line in text editor

```

Or more breifly,

```julia
julia> @edit println("this opens", [:the, :source], "in an editor")

```
