Repository navigation
Conversation
| depth = len(match.group(1)) | ||
| type = match.group(2) | ||
|
|
||
| if type in int_types + float_types + complex_types + other_types: |
There was a problem hiding this comment.
Might it be worth caching this list, or checking each individually? It'll only be used during import yes, but it's better to not be more expensive than necessary.
There was a problem hiding this comment.
Agreed. Can be done by assigning the whole concatenation to an additional default argument, for example.
BTW, type overrides the builtin name, so I'd rather call the variable type_name.
|
BTW, the fact that travis is unhappy is unrelated to this PR. Would be nice if you could rebase it on latest master. |
|
Any update on this? |
|
@scoder I have been on holiday for the past two weeks with limited access
to my laptop and wifi. I will update the PR as soon as I get back.
In the meantime, I think this should come with a test as well. I presume
that this fits best under tests/run, correct?
…On Fri, Aug 31, 2018 at 10:29 scoder ***@***.***> wrote:
Any update on this?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2571 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/Ab0F0zKTZeKbUOAkg1Thw8DUJKGJxGP6ks5uWPPUgaJpZM4WIbNO>
.
|
|
All fine, no rush, just wanted to check back. |
|
|
||
|
|
||
| def test_module_getattr_pointers: | ||
| cython.p_int |
There was a problem hiding this comment.
These should be used in a valid context, e.g. use int_ptr: cython.p_int as a variable declaration. Preferably, also find a way to make actual use of these variables. :)
|
@scoder I'll try looking into it. Can you give me some guidance on the work thats already done and what needs to be done. I would be really thankful. 👍 |
|
Instead of using |
|
@TeamSpen210, sounds good. |
Leverages module-level
__getattr__as introduced in PEP 562 (Python 3.7+) to enable unbounded depth on pointers in interpreted Python based on their names; i.e.from cython import ppppppp_intwill now be valid.