Giter VIP home page Giter VIP logo

Comments (5)

johnyf avatar johnyf commented on September 28, 2024

2041f71 introduces conversion of single-line MATLAB comments to their python counterparts, by replacing % by #. Conversion of multi-line comments remains.

from smop.

johnyf avatar johnyf commented on September 28, 2024

Additional features to be implemented:

  • multi-line comments
  • function help text translation to docstring

from smop.

victorlei avatar victorlei commented on September 28, 2024

I think I integrated your code, thanks.

Please run the new code on fastsolver.m and fix the regressions.

python fastsolver.m
python a.py

*** error messages here ***

On Mon, Nov 25, 2013 at 12:18 PM, Ioannis Filippidis <
[email protected]> wrote:

Additional features to be implemented:

  • multi-line comments
  • function help text translation to docstring


Reply to this email directly or view it on GitHubhttps://github.com//issues/16#issuecomment-29190204
.

Calligraphy of geese / Against the sky / The moon seals it /
(Buson/Hass)

from smop.

johnyf avatar johnyf commented on September 28, 2024

Yes, the changes have been integrated, thank you.

The problem was with the commented line

if curscore2<curscore
    moves=moves22;
else
    %   [moves1,yess]=dealWall1(A,B,w0,moves);
end;

in fastsolver.m. The result after translation with comments enabled was:

else:
    #   [moves1,yess]=dealWall1(A,B,w0,moves);
#etc

This caused an indentation error, because it requires that either a pass statement be inserted, or the comment deleted.
Enabling comments intends to keep all comments, so deleting the comment is not the behavior expected by the user.
So the preferred solution appears to be to detect this specific case and insert a pass statement.
1bc6c3a implements this.

Note that in general the same issue can occur also with while and for statements. These cases remain open. If the patch is agreed to be the appropriate fix, then I can extend it to cover these cases as well.

from smop.

dalito avatar dalito commented on September 28, 2024

@victorlei
Above some changes to support comments are linked. They are surprisingly not in the current master branch. Is this intended or by mistake?

from smop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.