[pywin32-bugs] [ pywin32-Feature Requests-1429820 ] Better documentation for CtxtHandleType, and oth
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2006-02-12 23:09:00
|
Feature Requests item #1429820, was opened at 2006-02-12 07:23 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551957&aid=1429820&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: win32 Group: None Status: Closed Resolution: Fixed Priority: 5 Submitted By: Norman Rasmussen (normanr) Assigned to: Nobody/Anonymous (nobody) Summary: Better documentation for CtxtHandleType, and others Initial Comment: PyCredHandle does it right: In the Comments section in the help file it tells you to use win32security.CredHandleType() to create an instance. These classes require the same code, but the help doesn't tell you that: - PyCtxtHandle - PySecBufferDesc - PySecBuffer Possibly: Is there anyway to make a default constructor for these classes so you don't have to call ThingType() to create a new PyThing. ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2006-02-13 10:08 Message: Logged In: YES user_id=14198 I think you are simply saying that the name of the type in the module isn't the same as what __name__ returns? I'm inclined to agree that should be fixed, and that __name__ should match the name in the dict. I haven't been very consistent myself with that, but it certainly makes more sense when using real types here. ---------------------------------------------------------------------- Comment By: Norman Rasmussen (normanr) Date: 2006-02-13 02:01 Message: Logged In: YES user_id=336265 My objection is to the ThingType object itself. (the only thing is does is allow you to create a PyThing object) eg: >>> import win32security >>> win32security.CtxtHandleType.__name__ 'PyCtxtHandle' The docs all reference PyCtxtHandle, and not CtxtHandleType. So why can't I use win32security.PyCtxtHandle() ? ---------------------------------------------------------------------- Comment By: Roger Upole (rupole) Date: 2006-02-13 01:37 Message: Logged In: YES user_id=771074 Calling win32security.CtxtHandleType() calls the type's __new__ constructor. A distinct function to create the handle would be just a pass-thru to the same type constructor, so there's really no advantage to having a function separate from the type object. Roger ---------------------------------------------------------------------- Comment By: Norman Rasmussen (normanr) Date: 2006-02-12 23:37 Message: Logged In: YES user_id=336265 Cool. Is there no way to make a constructor for these objects on the same object? Either via setting a __init__ method, or even providing a 'new' static method on the object. i.e. win32security.PyCtxtHandle.New() instead of win32security.CtxtHandleType(). I'm guessing that win32security.PyCtxtHandle() is much harder? ---------------------------------------------------------------------- Comment By: Roger Upole (rupole) Date: 2006-02-12 22:12 Message: Logged In: YES user_id=771074 Just checked in win32security_sspi.cpp 1.5 with some clarifications and corrections. Roger ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551957&aid=1429820&group_id=78018 |