jeetsukumaran / DendroPy

A Python library for phylogenetic scripting, simulation, data processing and manipulation.
https://pypi.org/project/DendroPy/.
BSD 3-Clause "New" or "Revised" License
210 stars 61 forks source link

Documentation formatting #78

Closed beroe closed 7 years ago

beroe commented 7 years ago

Is the terminal comma in the Reading and Writing Trees section of the documentation correct and supposed to be there?

jeetsukumaran commented 7 years ago

Could you be more specific? Which part exactly?

beroe commented 7 years ago

Don't remember how to format a chunk of,code in github, but...

import` dendropy
tree = dendropy.Tree.get(
    path="trees1.nex",
    schema="nexus",
    tree_offset=2,    # <-- this comma
    )
tree.write(
    path="trees1.newick",
    schema="newick",   # <-- this comma
    )

And there is one more.

jeetsukumaran commented 7 years ago

Yes and no. It is not necessary, but neither is it invalid Python syntax. I like to keep it in multi-line calls such as this so as to easily add/remove/rearrange lines without worrying about the comma.

beroe commented 7 years ago

OK, thanks for the explanation. That makes sense, though it can be confusing on first exposure.