cytoscape / py2cytoscape

Python utilities for Cytoscape and Cytoscape.js
https://py2cytoscape.readthedocs.io
MIT License
178 stars 45 forks source link

Why? #85

Closed zachary822 closed 5 years ago

zachary822 commented 5 years ago

https://github.com/cytoscape/py2cytoscape/blob/41fcca49b842dad78dc0a9fc501e0bc61f6eb4be/py2cytoscape/cyrest/base.py#L24-L29

This is just creating a dict the hard way. If you already know both keys and values, why not just

PARAMS = {'key': 'value'}

PARAMS = set_param(['key'], ['value'])  # this seems so unnecessary

Furthermore

def set_param(parameters,values):
     return dict(zip(parameters,values))  # still wholly unncessary, but at least it clearer
jorgeboucas commented 5 years ago

closed with 0279852 but feel free to clean it for real