# Python \_\_call\_\_ equivalent in Julia

**URL:** https://discourse.julialang.org/t/python-call-equivalent-in-julia/36905
**Category:** New to Julia
**Tags:** question
**Created:** [April 2, 2020, 2:43pm UTC](https://discourse.julialang.org/t/python-call-equivalent-in-julia/36905 "2020-04-02T14:43:35Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![Mason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mason/32/2423_2.png) [@Mason](https://discourse.julialang.org/u/Mason)
#### Post date: [April 3, 2020, 1:35am UTC](https://discourse.julialang.org/t/python-call-equivalent-in-julia/36905/5 "2020-04-03T01:35:44Z")

</div>

I disagree that this is less OO than what @mauro3 showed (regardless of what the term OO actually means). The closure you show in your code is implemented as a `struct` storing `a`. The only real difference between the two examples is that yours is one line shorter but produces intermediate outputs which might be less legible and shouldn’t be dispatched on.

```julia
julia> dump(mul)
#13 (function of type var"#13#14"{Int64})
  a: Int64 2

```

* * *

edited to make the tone seem less aggressive (did not mean to be aggressive)

---

_[View the full topic](https://discourse.julialang.org/t/python-call-equivalent-in-julia/36905)._
