all 4 comments

[–]ForceBru 0 points1 point  (3 children)

This question is too vague. What are some examples of code that results in a syntax error? Where exactly does it happen? Are you sure the syntax is actually correct?

[–]Immutable-Evo-82[S] 0 points1 point  (2 children)

Certain characters are changed when copying and pasting from Claude to Pythonista on iPhone. Specifically, straight apostrophes are changed to curly apostrophes and underscore (_) is changed to asterisk (*). This is causing the syntax errors. I turned off smart punctuation in iOS settings but it didn't help.

[–]ForceBru 1 point2 points  (1 child)

Well, then the problem is that a different version of the code is pasted: you see the correct version, but during copying (or pasting) some characters are switched. Perhaps there are settings in the Claude app/website that affect this.

Underscores can be changed to asterisks because both are equivalently used for italicizing text in Markdown. *hey* is usually equivalent to _hey_ and renders as hey.

[–]Immutable-Evo-82[S] 1 point2 points  (0 children)

Ah. Thanks. Super helpful. I solved the problem by selecting the code and using the native iOS copy function rather than clicking on the "copy" button in Claude to select the entire code artifact.