def d(self, useSandT=False, use_closed_attrib=False):
if use_closed_attrib:<EOL><INDENT>self_closed = self.closed(warning_on=False)<EOL>if self_closed:<EOL><INDENT>segments = self[:-<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>segments = self[:]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self_closed = False<EOL>segments = self[:]<EOL><DEDENT>current_pos = None<EOL>parts = []<EOL>previous_segment = None<EOL>end = self[-<NUM_LIT:1>].end<EOL>for segment in segments:<EOL><INDENT>seg_start = segment.start<EOL>if current_pos != seg_start or(self_closed and seg_start == end and use_closed_attrib):<EOL><INDENT>parts.append('<STR_LIT>'.format(seg_start.real, seg_start.imag))<EOL><DEDENT>if isinstance(segment, Line):<EOL><INDENT>args = segment.end.real, segment.end.imag<EOL>parts.append('<STR_LIT>'.format(*args))<EOL><DEDENT>elif isinstance(segment, CubicBezier):<EOL><INDENT>if useSandT and segment.is_smooth_from(previous_segment,<EOL>warning_on=False):<EOL><INDENT>args = (segment.control2.real, segment.control2.imag,<EOL>segment.end.real, segment.end.imag)<EOL>parts.append('<STR_LIT>'.format(*args))<EOL><DEDENT>else:<EOL><INDENT>args = (segment.control1.real, segment.control1.imag,<EOL>segment.control2.real, segment.control2.imag,<EOL>segment.end.real, segment.end.imag)<EOL>parts.append('<STR_LIT>'.format(*args))<EOL><DEDENT><DEDENT>elif isinstance(segment, QuadraticBezier):<EOL><INDENT>if useSandT and segment.is_smooth_from(previous_segment,<EOL>warning_on=False):<EOL><INDENT>args = segment.end.real, segment.end.imag<EOL>parts.append('<STR_LIT>'.format(*args))<EOL><DEDENT>else:<EOL><INDENT>args = (segment.control.real, segment.control.imag,<EOL>segment.end.real, segment.end.imag)<EOL>parts.append('<STR_LIT>'.format(*args))<EOL><DEDENT><DEDENT>elif isinstance(segment, Arc):<EOL><INDENT>args = (segment.radius.real, segment.radius.imag,<EOL>segment.rotation,int(segment.large_arc),<EOL>int(segment.sweep),segment.end.real, segment.end.imag)<EOL>parts.append('<STR_LIT>'.format(*args))<EOL><DEDENT>current_pos = segment.end<EOL>previous_segment = segment<EOL><DEDENT>if self_closed:<EOL><INDENT>parts.append('<STR_LIT>')<EOL><DEDENT>return '<STR_LIT:U+0020>'.join(parts)<EOL>
Returns a path d-string for the path object.
        For an explanation of useSandT and use_closed_attrib, see the
        compatibility notes in the README.