# Why not real anonymous functions?

**URL:** <https://discuss.python.org/t/why-not-real-anonymous-functions/44513>\
**Category:** Ideas\
**Created:** [January 30, 2024, 2:27am UTC](https://discuss.python.org/t/why-not-real-anonymous-functions/44513 "2024-01-30T02:27:09Z")\
**Posts on this page:** 1\
**Showing post:** 45

<div class="post-metadata">

**Author:** ![drdavella](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/drdavella/32/11792_2.png) [@drdavella](https://discuss.python.org/u/drdavella)\
**Post date:** [January 31, 2024, 7:59pm UTC](https://discuss.python.org/t/why-not-real-anonymous-functions/44513/45 "2024-01-31T19:59:21Z")

</div>

Just for the sake of a concrete example:

```python
foo = def (*args, **kwargs): do
    print("anoynmous function")
    if args[0]:
        call_something()
    return 42
end
foo(1, 2, 3)

```

```python
this_func_takes_a_func_arg(
    first_arg,
    def (*args, **kwargs): do
        print("anoynmous function")
        if args[0]:
            call_something()
        return 42
    end,
    "whatever",
)

```

---

_[View the full topic](https://discuss.python.org/t/why-not-real-anonymous-functions/44513)._
