OK I am able to see working the version with parse_expr with a local_dict the previous sympify syntax used which failed with "x" was slightly more complex in that it also used a dict(subs).
Should i be able to call parse_expr with the local_dict to declare x AND the dict(subs) to evaluate. In such a case if it were valid, it would make sense the evaluate flag would be set to True. Does any of the above make sense ? Thanks for any comments, Daniel. On Tuesday, 6 January 2026 at 13:06:24 UTC Little Grey Men wrote: > Thank you both for your helpful answers... > Certain blogs/observations had led me to the way I asked the question here. > like cannot use "x" and parse_expr has symbolize built in etc > > Anyhow I will assimilate your info into the problem and it seems like it > quite possible... > > thanks > Daniel. > > > > > > On Tuesday, 6 January 2026 at 12:23:00 UTC Oscar wrote: > >> On Tue, 6 Jan 2026 at 11:34, Little Grey Men <[email protected]> wrote: >> > >> > Would like some advice on use of string "x" as expression source. >> > "x**1" can work ok with sympify >> > "1x" can work with parse_expr >> > >> > We try "x" with sympify and can see it return a type that is not >> sympy.Expr >> > Apparently "x" can never work by design <- will that change?, >> > is some option combo to parse "x"? >> >> It is not clear what you mean here: >> >> In [15]: isinstance(sympify("x"), Expr) >> Out[15]: True >> >> -- >> Oscar >> > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/sympy/7f32658e-df62-4987-b24d-06225ace9e0an%40googlegroups.com.
