igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] Forbidden attribute names would be nice


From: Harker Rhodes
Subject: [igraph] Forbidden attribute names would be nice
Date: Sun, 12 Jul 2015 20:54:19 -0400

As a way of avoiding typos, it would be nice if attribute names like "weights" were forbidden and  generated an error message. Because if I type for example E(g)$weights, I almost certainly mean E(g)$weight.  

It is a particular problem because many functions have an optional argument "weights" making it hard to remember when to use the singular and when to use the plural.

For example, the function "betweenness" has an optional argument "weights" (plural) the default for which is the weight (singular) edge attribute.
 
Harker

C. Harker Rhodes, MD, PhD
Professor of Pathology and Neurology (Retired)
Geisel School of Medicine at Dartmouth

Senior Scientist [C]; National Institute of Mental Health
Human Brain Collection Core
10 Center Drive, Rm. 4N306, Bethesda, MD
Phone: 603-443-3360
E-mail: address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]