Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

pya.Cursor.None bug?

I was looking at the list of available functions to pya.Cursor

I noticed "None" was part of it and I assume it should make no cursor visible however, there is an issue when compiling (pya.Cursor.None),

It seems to be a conflict with standard python empty variable?

Comments

  • Still adding a piece of code:

    pya.Cursor.Cross #compile without issue
    pya.Cursor.None #syntax error
    
  • Answering partially my own question:

    to make the Cursor not visible we can use

    pya.Cursor.Blank
    

    Why 'None' is listed in the available functions to pya.Cursor is not so clear however

  • Hi jonathan,

    "None" was intended to reset the cursor to the application default, not make it invisible. But for Python, "None" is a reserved word, so this is not available :-(

    I'll give a different name (i.e. "Default") and leave "None" only for backward compatibility. Here is the ticket: https://github.com/KLayout/klayout/issues/386

    Matthias

Sign In or Register to comment.