- edited description
Hybrid Property documentation example Does Interval Intersect Wrong
I don't know if we even care to fix this or maybe just rename it from intersect to contains range; however, the docs at https://bitbucket.org/zzzeek/sqlalchemy/src/be548690c7053a25a546d47cc4ae6e3595c6f421/lib/sqlalchemy/ext/hybrid.py?at=master&fileviewer=file-view-default#hybrid.py-52 would fail for an example of
Interval(3, 5).intersects(Interval(2, 5))
Although those intervals do intersect. I'm happy to fix this, just let me know if you would like to just rename intersects or if you want intersects to work for these cases.
Comments (6)
-
reporter -
repo owner - changed title to Hybrid Property documentation example Does Interval Intersect Wrong
- changed component to documentation
hi Jason -
I'm not sure where I got that logic from, perhaps I just came up with it on the fly, as I was only concerned with illustrating, "here's how to make a hybrid method" - if we can fix the intersect() function to work correctly, assuming it doesn't make the code so dense that it no longer illustrates the original point, that would be great.
- mike
-
repo owner - changed status to resolved
Correcting the Hybrid Property Example
Fixes
#3528Signed-off-by: Jason Myers jason@jasonamyers.com
→ <<cset db824b535359>>
-
repo owner Correcting the Hybrid Property Example
Fixes
#3528Signed-off-by: Jason Myers jason@jasonamyers.com
→ <<cset 89276b5cadaa>>
-
repo owner Correcting the Hybrid Property Example
Fixes
#3528Signed-off-by: Jason Myers jason@jasonamyers.com
Conflicts: lib/sqlalchemy/ext/hybrid.py
→ <<cset 4c625bca36e0>>
-
repo owner Correcting the Hybrid Property Example
Fixes
#3528Signed-off-by: Jason Myers jason@jasonamyers.com
Conflicts: lib/sqlalchemy/ext/hybrid.py
→ <<cset 31c0f3a474c4>>
- Log in to comment