FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
codeql/python/ql/src/Expressions/EqualsNone.py at codeql-cli-2.11.3 · github/codeql · GitHub
github
/
codeql
Public
Notifications
You must be signed in to change notification settings
Fork
2.1k
Star
10.1k
Code
Issues
1k
Pull requests
468
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
codeql
/
python
/
ql
/
src
/
Expressions
/
EqualsNone.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
12 lines (10 loc) · 432 Bytes
Breadcrumbs
codeql
/
python
/
ql
/
src
/
Expressions
/
EqualsNone.py
Copy path
File metadata and controls
12 lines (10 loc) · 432 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
def
filter1
(
function
,
iterable
=
None
)
if
iterable
==
None
:
# Comparison using '__eq__'
return
[
item
for
item
in
iterable
if
item
]
else
:
return
[
item
for
item
in
iterable
if
function
(
item
)]
def
filter2
(
function
,
iterable
=
None
)
if
iterable
is
None
:
# Comparison using identity
return
[
item
for
item
in
iterable
if
item
]
else
:
return
[
item
for
item
in
iterable
if
function
(
item
)]
Back
|
FazBrowse Home
|
New Git URL