• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Can’t access class @property from other @property in Cython

Resolved: Can’t access class @property from other @property in Cython

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I’m learning Cython and ran into the following weird bug
Running this I get
Why is self.km set to 0 when I try to read it from miles and meters?

Answer:

You have two definitions of miles, meters and km – the properties and the cdef variables with the same name.
Cython looks to be reading from the cdef variables, which will be automatically zero initialized.

If you have better answer, please add a comment about this, thank you!

cython
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Java Swing center JLabel in JPanel with two JLabels

27/03/2023

Resolved: How to compare two text files and and change the sign of the data in powershell?

27/03/2023

Resolved: Java Virtual Machines deleted

27/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.