Maybe both?  Have individual methods for those who want to just call it, and a setflags type method that you can pass bit flags into to set.  That way if you have several flags to set you can do it in one call, or just call the one flag you want to set.

Won't add too much, and make it easier for some people.  The individual methods could be nothing more than a wrapper around the setflag method with the appropriate flag.


On Thursday, August 28, 2014 9:56 AM, Chris Angelico <rosuav@gmail.com> wrote:


Both of these have been discussed previously, but now they're posted
as topic branches in the main repo. (I've also pushed a few
non-controversial GTK2 changes to the 8.0 and 7.8 branches.)

Branch: rosuav/pango_xy_to_char

Adds a new method xy_to_char() to the GTK2.Pango.Layout object,
parallel to xy_to_index(). It'll be slower, as it has to do more work,
but it feels cleaner. Pike code constructs Pango layout objects using
Unicode strings, not UTF-8, so getting back character indexes makes
more sense than byte positions.

Branch: rosuav/naglingcontrol

Adds a new method nodelay() to Stdio.File to control the TCP_NODELAY
flag. This is definitely debatable, as there's now starting to be more
of a proliferation of flag-controlling methods. Would it be better to
have a single method to set/reset flags? How should detection of
available flags be done? (With the nodelay() method, the presence of
the function implies its callability.) If this were Python, we'd have
a lengthy python-ideas thread and probably a PEP to discuss this. :)

Thoughts?

ChrisA