This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author aimacintyre
Recipients
Date 2006-03-22.08:28:25
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=250749

Thanks for the comments.

As implemented, the function is both a getter and
(optionally) a setter which makes attempting to use a
"get"/"set" prefix 
awkward.

I chose this approach to make it a little simpler to support
temporary changes.  I did consider using a module
attribute/variable, but it is slightly more unwieldy for
this case:

old_size = thread.stack_size(new_size)
...
thread.stack_size(old_size)

vs

old_size = thread.stack_size
thread.stack_size = new_size
...
thread.stack_size = old_size

or (using get/set accessors)

old_size = thread.get_stacksize()
thread.set_stacksize(new_size)
...
thread.set_stacksize(old_size)

I think an argument can be made for passing on the
"get"/"set" naming consistency based on the guidelines in
PEP 8.  While I have a preference for what I've implemented,
I'm more interested in getting the functionality in than
debating its decor.  If there's a strong view about these 
issues, I'm prepared to revise the patch accordingly.

I don't believe that the functionality belongs anywhere else
than the thread module, except possibly shadowing it in the
threading module, as it is highly specific to thread
support.  The sys module seems more appropriate for general 
knobs, and only for specific knobs when there is no other
choice IMO.  Doing it outside the thread module also
complicates the implementation, which I was trying to keep
as simple as I could.
History
Date User Action Args
2007-08-23 15:47:00adminlinkissue1454481 messages
2007-08-23 15:47:00admincreate