Abandoned python plucked from the Chilliwack back country
Posted on 19 June 2013
Posted on 19 June 2013
Posted on 19 June 2013
Posted on 19 June 2013
Posted on 18 June 2013
Posted on 18 June 2013
Posted on 18 June 2013
Posted on 17 June 2013
Posted on 16 June 2013
Posted on 16 June 2013
Posted on 6 June 2013
recent bookmarks tagged Python
Posted on 19 June 2013
Posted on 19 June 2013
Posted on 19 June 2013
Posted on 19 June 2013
Posted on 19 June 2013
Posted on 19 June 2013
Posted on 19 June 2013
Posted on 19 June 2013
Posted on 19 June 2013
Posted on 19 June 2013
Questions About Python (programming language)
Posted on 19 June 2013
Posted on 19 June 2013
Posted on 18 June 2013
Posted on 18 June 2013
Posted on 18 June 2013
Posted on 17 June 2013
Posted on 17 June 2013
Posted on 16 June 2013
Posted on 16 June 2013
Posted on 16 June 2013
Posted on 15 June 2013
Posted on 15 June 2013
Posted on 14 June 2013
Posted on 14 June 2013
Posted on 14 June 2013
Posted on 13 June 2013
Posted on 13 June 2013
Posted on 13 June 2013
Posted on 13 June 2013
Posted on 13 June 2013
Posted on 13 June 2013
Posted on 12 June 2013
Posted on 12 June 2013
Posted on 12 June 2013
Posted on 12 June 2013
Posted on 12 June 2013
Posted on 12 June 2013
Posted on 12 June 2013
Posted on 12 June 2013
Posted on 11 June 2013
Posted on 11 June 2013
Posted on 11 June 2013
Posted on 10 June 2013
Posted on 10 June 2013
Posted on 10 June 2013
Posted on 9 June 2013
Posted on 9 June 2013
Posted on 8 June 2013
Posted on 8 June 2013
Posted on 7 June 2013
Posted on 7 June 2013
Posted on 6 June 2013
Posted on 6 June 2013
Posted on 6 June 2013
Posted on 5 June 2013
Posted on 5 June 2013
Posted on 5 June 2013
Posted on 4 June 2013
Posted on 4 June 2013
Posted on 4 June 2013
Posted on 3 June 2013
Posted on 3 June 2013
Posted on 3 June 2013
Posted on 3 June 2013
Posted on 3 June 2013
Posted on 3 June 2013
Posted on 2 June 2013
Posted on 2 June 2013
Posted on 2 June 2013
Posted on 2 June 2013
Posted on 1 June 2013
Posted on 1 June 2013
Posted on 1 June 2013
Posted on 1 June 2013
Posted on 31 May 2013
Posted on 31 May 2013
Posted on 30 May 2013
Posted on 30 May 2013
Posted on 30 May 2013
Posted on 30 May 2013
Posted on 29 May 2013
Posted on 29 May 2013
Posted on 28 May 2013
Posted on 28 May 2013
Posted on 28 May 2013
Posted on 28 May 2013
Posted on 28 May 2013
Posted on 28 May 2013
Posted on 27 May 2013
Posted on 27 May 2013
Posted on 26 May 2013
Posted on 26 May 2013
Posted on 25 May 2013
Posted on 25 May 2013
Posted on 25 May 2013
Posted on 25 May 2013
Posted on 24 May 2013
Posted on 23 May 2013
Posted on 23 May 2013
Posted on 23 May 2013
Posted on 23 May 2013
Posted on 23 May 2013
Posted on 22 May 2013
Posted on 22 May 2013
Posted on 21 May 2013
Posted on 21 May 2013
Posted on 21 May 2013
Posted on 21 May 2013
Posted on 20 May 2013
Posted on 20 May 2013
If you're using Flask or Werkzeug (independently of if you're planning on upgrading to Python 3) some help is wanted in making sure that the current versions in the git repositories don't break your code (too much).
There were some unfortunate API changes necessary due to the restricted bytes type on Python 3 which might show up:
Headers.linkedwas removed without replacement. The API just does not work without string coercion.Headers now returns unicode objects all the time and headers are restricted to latin1. This is the only thing that makes sense on PEP 3333werkzeug.urls is now rewritten from scratch without the stdlib and provides URL parsing and joining functions. Use those instead of the stdlib one if you want code that works on 2.x and 3.x. They are internally uniforming IRIs and URIs (or at least attempt).flask.json instead of json or simplejson on Python 3 to get unified behavior on 2.x and 3.x regardless of if the stdlib's JSON or simplejson module is used.direct_passthrough flag. This might show some errors in your code now.To see if your app works with the changes check out the master branches from github and install them into a virtualenv.
Repositories:
https://github.com/mitsuhiko/flask.git https://github.com/mitsuhiko/werkzeug.git Thanks :)
Posted on 30 May 2013
Imagine for a second that you love java and dynamic languages are conceived by the devil. What type of questions would you have? And how would you best answer them?
I want to be able to "wow" these people and change their way of thinking about Python and dynamic languages in general.
Posted on 23 May 2013
What are some common misconceptions that people have when programming in Python? Here are a couple that were passed around a mailing list I'm on:
'list.sort' returns the sorted list. (Wrong: it actually returns None.)
Misconception: The Python "is" statement tests for equality.
Reality: The "is" statement checks to see if two variables point to the same object.
This one is especially nasty, because for many cases, it "works", until it doesn't :)
In [1]: a = 'hello'
In [2]: b = 'hello'
In [3]: a is b
Out[3]: True
In [4]: a = 'hello world!'
In [5]: b = 'hello world!'
In [6]: a is b
Out[6]: False
In [7]: a = 3
In [8]: b = 3
In [9]: a is b
Out[9]: True
In [10]: a = 1025
In [11]: b = 1025
In [12]: a is b
Out[12]: False
This happens because the CPython implementation caches small integers and strings, so the underlying objects really are the same, sometimes.
If you want to check if two objects are equivalent, you must always use the == operator.
Posted on 13 May 2013
I am moving from writing one-off code and scripts to developing tools which are going to be used by a larger group. I am having trouble deciding if Python is the right tool for the jobs.
For example I am responsible for process a 1gb text file into some numerical results. Python was the obvious choice for reading the text file but I am wondering if Python is fast enough for production code.
Edit: Thanks for the all responses. I will continue to learn and develop in Python.
Posted on 6 May 2013
Hi, coding newbie here, I want to know why do you prefer Python over other language and it pro's and con's. Really interesed into learning Python, any tips?
Edit: Wow, such a great feedback, as I see the main Pro is the overall badass community that Python has behind (refer to all the comments in this thread), thanks guys.
Edit 2: The question now. Python 2.x or 3.x?
Posted on 5 April 2013
I understand there are python 2 and python 3. And I read on python.org that Python 2.x is the status quo, Python 3.x is the present and future of the language.
However from time to time I kind of doubt it. Is it really the case that people are (slowly) giving up python 2.x and starting to use python 3.x? What do you guys think?
Posted on 30 March 2013
I use this function a lot, and just cleaned it up a bit so I could send it to a couple of friends. I try to explain everything in the comments of the code itself, but I have no formal programming experience, so it's somewhat haphazard. None the less, I hope you guys find it useful and modify the code for your needs! EDIT: The Link might be useful.
Posted on 8 February 2013
I've spent the last year working as a software engineer writing a web-app in Python (using Pyramid). The interesting part is I'm not actually part of the IT department and they (a year ago) said I could use Python on the understanding I would get no support from them, they were advocating PHP. Due to my own experiences with the two and the project I would be undertaking I picked Python.
Fast forward to today and some other people from IT have performed a code review as the project has been far more successful than they anticipated and people are sitting up and taking notice. The main question they're asking has to do with Python, why am I using it? I've not had a chance to meet the questioners yet but I'm told some of them code in Python themselves and that the main suggestion coming from IT is to use Java instead.
I've had some exposure to Java but not a lot. I understand it's compiled to Byte-code, uses the JVM etc and that it's very popular in more established businesses. What I don't know (beyond what a simple Google search will tell me) is why I would pick one or the other.
I'm not after "Python is better than Java", I'm genuinly curious to hear from people experienced in both which aspects of each make them good for different problems. Is it that Java is a lot better past the 10k loc mark? Is it that Java is so much faster than Python?
I think I've covered everything, if not please let me know and I'll answer it.
Posted on 11 December 2012
I just started learning python and I think it is a very cool language that lets you do a lot of fun things but I have trouble see where it fits in at most companies. Can anyone elaborate how they use python?
Posted on 6 December 2012
Hello there. The very same question with Perl and Python switched has been posted to /r/perl and reminded me that I keep asking myself the same every now and then.
Posted on 9 November 2012
A little background
I am currently a developer at a well known software company in Redmond, Washington that's growing weary of being so enveloped in the .NET world. So much so, that I've decided to start attempting to switch to another popular software and search behemoth located in Mountain View, California. For the sake of scope, I'll be applying for web-centric software engineer positions.
What I need help understanding
Why is Python so popular and what are some stories for businessy projects written in Python? Are companies like Google even using Python for large apps or is it simply for smaller scripts?
My Goal
I've been trying to think of hobby projects to demonstrate Python knowledge on my GitHub. Ones that mimic the sort of problems I'd face as an engineer in the field, not simply academic "count the fish in the bowl" problems. Most of what I think of, I find myself thinking that Java, C++, or even JavaScript/Node would be a more reasonable language choice.
tl;dr
I feel like I have a Swiss Army Knife of skills, but I don't really know what this particular tool (Python) is best suited for in a business environment.
update: I'd like to say thank you for all the constructive responses! I half expected this to turn into a language war. This is definitely going to set me in the right direction :)
Posted on 5 November 2012
Title says it all. Python 2 is end of life and Python 3 is going to replace it but linux and corporations still use Python 2 as the default. When do you think we will all port over to Python 3?
Posted on 2 July 2012
To some programming colleagues I say I'm fluent in python but for some reason they just laugh and act like its illegitimate. I use Django and I think python is really powerful and saves a lot of time (money) when it comes to developing applications. I'm rather surprised it has this view. Where the heck did this whole elitism against python come from?
EDIT: TIL, many people who read this subreddit like to be very judgmental and critical of the way you words things. Oh and the assumptions, great read.
Posted on 22 June 2012
3D Programming in Python - Part 1
So I've started working on a series of tutorials that will (eventually) give a pretty in depth look into using OpenGL with python. In this first part, I go over some of the most basic rendering you can do in OpenGL. Hopefully a few of you will find this helpful!
Posted on 20 April 2012
Or is something like that just too complicated for the language? Or would it be too laggy because Python is interpreted, not compiled?
Posted on 25 March 2012
I'm not bothered with the fact that PHP was not designed and has inconsistencies etc., because I know my way around it well enough that it doesn't matter. I'm curious whether using Python would help me, as I don't hear much negativity around it.
What I want to know is, in terms of web dev, are there things Python can do that PHP can't? Is the language so much better that I'll be able to write better code in less time? Is it as fast as PHP, and are the frameworks as varied and battle tested? Are there any shortcomings to Python that would trip me up?
Thanks guys.
Posted on 19 November 2011
I lightheartedly joked in another thread that if the person had agreed with my point (that Python 3 seems very slightly harder to code in than Python 2.x - also a lighthearted, almost completely unfounded critique), that it would be the first time I'd ever seen any Python user online agree with any criticism of any part of the language. In this last bit I'm not really joking.
I had many newbie critiques a few years ago - 'self', the fact that you can't join a string list with myList.join(', '), something about slicing that I forget now, that it was confusing which things worked in-place, and which worked on a copy, etc. - and in a forum (not reddit) where I posted up my lengthy list (mostly to see what people thought of these things), I was met with a wall of responses, all strongly in favor of every last part of all of it, and even of things I hadn't mentioned. In 3 years I realize now I have never once seen anyone critique any part of the language and not be met with all manner of deep, philosophical justifications as to why that thing or those things must be that way.
It's the perfect language, I guess.
So my new question is just straight up: IS there anything about Python you don't like? I mean, it is moving to 3, and there are changes, so clearly 2.x had room for improvement, so let's hear it. Be prepared for a battle on all fronts from everyone else in here, though, whatever you say :) I'd love to hear from the real experts, the people who usually wield seemingly powerful reasoning and long strings of computer science words in their arguments.
This itself isn't a critique, nor even a jab, but just another attempt to learn more.
Posted on 16 November 2011
From what I can gather, both have comparable speed, and no really actually likes PHP... So why is it so widely used? Is Python just a poor choice for web development?
Posted on 13 September 2011
Posted on 8 September 2011
...or Java (and soon, Ruby, PHP, C#, etc.).
It's my first website with Flask (my first real dynamic website?). I wanted the domain to be coderedd.it, but it was too expensive :(. So I just asked my brother to help me host it.
Comments appreciated. :)
UPDATES:
def instead of class in PythonUPDATES 2:
I just opened up the repo at bitbucket https://bitbucket.org/john2x/rdoqdoq :)
Thanks everyone!
Posted on 6 September 2011
We all know Python isn't perfectly perfect, just practically perfect.
With that in mind, what changes would you make if you were brainstorming the ideal Python-like language? For example, do we really need the colon after an if statement? Shouldn't def f(default=[]): work the way you'd expect and not end up with a single global []? Isn't Ruby onto something when it makes mutating methods end in an exclamation mark by convention? And don't we really need a better syntax for passing an anonymous block as a callback? …
What are your ideas, /r/Python?
Posted on 29 May 2011
I was wondering what your guys favorite interview questions are when hiring a new python engineer (of any level).
Posted on 28 October 2010
So, I have just started using Python (have used other languages such as a small amount of C++ and FORTRAN) and wanted to ask those long in the tooth what tips do you think I should know; or good habits I should start using from the beginning?
Note: I am aware of PEP 8
Thanks r/Python!
EDIT: Thank you all for the overwhelming response of in depth resources; I hope this is as much help to other people as it is to me!
Posted on 11 September 2010
I found this nice little tid-bit Here - It's just a single comment on the page about "compiling" python apps into APKs, and Alexey.Reznichenko suggests that the feature is coming in the next couple of days.
In looking at his updates page, I am noticing some very interesting things like: (Template project for creating custom interpreter APK.) -- there's only java stuff in the file being referred to but he looks to be a very active developer!
Hopefully I'm not getting ahead of myself in being excited. Even if some unstable code is released I'll be more than pleased.
Posted on 1 July 2010
How do people use python as a PHP replacement for web-sites? How well does it work out? What books can people recommend me?
I'd love to know how to use python in this way, but have always been a little confused by the purpose of things like django and pylons.. Are they for building web services, which other python apps can query and throw data at? Or are they for creating web sites with a python back-end?
Cheers!
Posted on 6 June 2010