Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Safe navigation operator (&.) in Python

Tags:

python

So, I've been using Ruby for some time, and I'm wondering if there is something like the safe navigation operator &. in Python.

Here is an example of when to use the safe operator.

like image 266
Anthony Avatar asked Jul 26 '26 08:07

Anthony


1 Answers

Python does not have a safe navigation operator. It was proposed in PEP 505, however has been deferred.

like image 52
Antarr Byrd Avatar answered Jul 27 '26 20:07

Antarr Byrd