# PyGen - python style generators

**URL:** https://discourse.julialang.org/t/pygen-python-style-generators/3451
**Category:** Community
**Tags:** package, announcement
**Created:** [May 1, 2017, 4:09am UTC](https://discourse.julialang.org/t/pygen-python-style-generators/3451 "2017-05-01T04:09:29Z")
**Posts on this page:** 1
**Showing post:** 14

<div class="post-metadata">

### Author: ![fengyang.wang](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fengyang.wang/32/104_2.png) [@fengyang.wang](https://discourse.julialang.org/u/fengyang.wang)
#### Post date: [May 2, 2017, 4:33am UTC](https://discourse.julialang.org/t/pygen-python-style-generators/3451/14 "2017-05-02T04:33:00Z")

</div>

And even better (in my opinion), combining it with short-form function syntax,

```julia
f(x) = Channel() do c
    ...
    push!(c, y)
    ...
end

```

Effectively a macro-free way of defining a python-like generator.

---

_[View the full topic](https://discourse.julialang.org/t/pygen-python-style-generators/3451)._
