An Emacs mode for editing Python code

string literal info API

Registered by Andreas Roehler on 2013-02-17

tkf opened this issue at python.el
Request: API to access string literal information

I know it took some time to implement parser for triple quote, so it would be great if python.el provides APIs then other libraries can use the information. The API I have in mind is something that returns values bound in let* clause in python-fill-string. For example, how about a function called python-string-info to return a plist like this (so that you can easily destcut it by destructuring-bind):

(:start INT
 :end INT
 :num-quotes INT
 :quote-str STR ; " or '
 :multi-line-p BOOL
 :docstring-p BOOL)

or probably a defstruct object. High-level API functions such as python-triple-string-p and python-docstring-p would be useful too.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
Obsolete
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Andreas Roehler on 2013-04-30

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.