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 erik.bray
Recipients erik.bray, jdemeyer
Date 2018-08-03.17:33:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> What makes functions different from variables? Aren't they essentially just pointers?

You're on the right track by noting a difference between functions and data variables.  I can tell you off the bat that when it comes to data imported from DLLs, non-functions are handled (somewhat by necessity) quite differently from functions.

That said, since you asked, I struggled to articulate *exactly* why this exact problem occurs on Cygwin (actually on Windows in general), so I thought about it for a while and wrote up an explanation in a blog post:

The TL;DR though is that limitations of how the runtime dynamic loader on Windows works are such that it's impossible to initialize static data with a pointer to some data in an external library.  The compiler knows this and prevents you from doing it.  The workaround is simple enough for most cases: Complete the initialization at runtime.  In the case of PyType_Type objects, PyType_Ready can set their base type at runtime just fine.
Date User Action Args
2018-08-03 17:33:47erik.braysetrecipients: + erik.bray, jdemeyer
2018-08-03 17:33:47erik.braysetmessageid: <>
2018-08-03 17:33:47erik.braylinkissue34211 messages
2018-08-03 17:33:47erik.braycreate