Skip to content

Complete intro_supply_demand.md #138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
11 tasks done
jstac opened this issue Mar 20, 2023 · 3 comments
Closed
11 tasks done

Complete intro_supply_demand.md #138

jstac opened this issue Mar 20, 2023 · 3 comments
Assignees

Comments

@jstac
Copy link
Contributor

jstac commented Mar 20, 2023

TODO -- edits

TODO -- extension

Add the example from https://github.com/QuantEcon/cbc_workshops/blob/main/day_1/equilibrium.ipynb

  • Illustrate surplus
  • Compute surpluses using numerical integration
  • Check welfare theorems numerically? As an exercise?

TODO --- code

If code is extracted from the other supply and demand lectures, check

  • spaces around * and @ (closer to PEP8)
  • camel case for classes, no underscore (consistent with PEP8)
@HengchengZhang
Copy link
Member

Hi @jstac @mmcky, I'm looking at the issues with supply and demand lectures and is the building error you mentioned fixed in #143 by Matt?

@HengchengZhang
Copy link
Member

And for the white spaces around @ and *, I think PEP8 doesn't have a clear rule:

  • Always surround these binary operators with a single space on either side: assignment (=), augmented assignment (+=, -= etc.), comparisons (==, <, >, !=, <>, <=, >=, in, not in, is, is not), Booleans (and, or, not).
  • If operators with different priorities are used, consider adding whitespace around the operators with the lowest priority(ies). Use your own judgment; however, never use more than one space, and always have the same amount of whitespace on both sides of a binary operator:

Shall we keep the white spaces in this case(like in other lectures)?

@HengchengZhang HengchengZhang self-assigned this Apr 19, 2023
@jstac
Copy link
Contributor Author

jstac commented Apr 20, 2023

Yes, let's generally keep whitespaces around all operators except **

(Sometimes I break the rule if I'm trying to squeeze onto a line.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants