Skip to content
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

assignment to true and false should throw const error #226

Closed
StefanKarpinski opened this issue Oct 17, 2011 · 4 comments
Closed

assignment to true and false should throw const error #226

StefanKarpinski opened this issue Oct 17, 2011 · 4 comments
Assignees
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@StefanKarpinski
Copy link
Member

julia> true = 12
true

julia> false = "hello"
false
@GeorgeXing
Copy link
Contributor

This reminds me of fun things you can do in python!
In my python 2.6.6:

>>> True = not True
>>> False = not False
>>> (True, False)
(False, True)

@StefanKarpinski
Copy link
Member Author

Ugh. That's horrible. And it actually switches the values. After doing that, True behaves like False and vice versa. All this implies that Python can't actually optimize this into non-branch code:

if True:
  # do something

@JeffBezanson
Copy link
Member

But it's dynamic! It's so convenient!

@StefanKarpinski
Copy link
Member Author

It is handy for opposite day.

StefanKarpinski pushed a commit that referenced this issue Feb 8, 2018
Reword description of writemime changes
cmcaine added a commit to cmcaine/julia that referenced this issue Sep 24, 2020
* Use docstrings instead of type annotations

Users often overdo it on the type annotations in a way that is
unidiomatic for Julia and contrary to the recommendations of experienced
Julia programmers like Lyndon White and the Julia core team.

To provide some guidance to users, I've added docstrings to all of the
exercise skeletons that I've removed annotations from (the first three
in the track).

* Be explicit about return type in leap.jl

* Quote a type in docstring
ViralBShah pushed a commit that referenced this issue Sep 9, 2023
Stdlib: Downloads
URL: https://github.com/JuliaLang/Downloads.jl.git
Stdlib branch: master
Julia branch: master
Old commit: f97c72f
New commit: 8a614d5
Julia version: 1.11.0-DEV
Downloads version: 1.6.0(It's okay that it doesn't match)
Bump invoked by: @DilumAluthge
Powered by:
[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)

Diff:
JuliaLang/Downloads.jl@f97c72f...8a614d5

```
$ git log --oneline f97c72f..8a614d5
8a614d5 Skip flakey "concurrent requests" tests on windows (#228)
246504e add a small precompile workload (#226)
3ed0f08 Document how to bypass the 20-second timeout (#222)
```

Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
KristofferC pushed a commit that referenced this issue Jan 16, 2024
…ead289a (#52886)

Stdlib: Downloads
URL: https://github.com/JuliaLang/Downloads.jl.git
Stdlib branch: release-1.10
Julia branch: backports-release-1.10
Old commit: f97c72f
New commit: ead289a
Julia version: 1.10.0
Downloads version: 1.6.0(It's okay that it doesn't match)
Bump invoked by: @IanButterworth
Powered by:
[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)

Diff:
JuliaLang/Downloads.jl@f97c72f...ead289a

```
$ git log --oneline f97c72f..ead289a
ead289a Close Multi timers atexit. Add 1.6 CI (#234)
8a614d5 Skip flakey "concurrent requests" tests on windows (#228)
246504e add a small precompile workload (#226)
3ed0f08 Document how to bypass the 20-second timeout (#222)
```

Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
Drvi pushed a commit to RelationalAI/julia that referenced this issue Jun 7, 2024
…ead289a (JuliaLang#52886)

Stdlib: Downloads
URL: https://github.com/JuliaLang/Downloads.jl.git
Stdlib branch: release-1.10
Julia branch: backports-release-1.10
Old commit: f97c72f
New commit: ead289a
Julia version: 1.10.0
Downloads version: 1.6.0(It's okay that it doesn't match)
Bump invoked by: @IanButterworth
Powered by:
[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)

Diff:
JuliaLang/Downloads.jl@f97c72f...ead289a

```
$ git log --oneline f97c72f..ead289a
ead289a Close Multi timers atexit. Add 1.6 CI (JuliaLang#234)
8a614d5 Skip flakey "concurrent requests" tests on windows (JuliaLang#228)
246504e add a small precompile workload (JuliaLang#226)
3ed0f08 Document how to bypass the 20-second timeout (JuliaLang#222)
```

Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants