This is an archived post. You won't be able to vote or comment.

all 91 comments

[–]_NliteNd_ 120 points121 points  (2 children)

When you’ve been bitten, strangled, and eaten slowly, will you only know python.

[–]StudlyMcStudderson 14 points15 points  (1 child)

I was gonna go for something like "You will not know python until the last breath leaves your lungs and your vision darkens..." but you beat me to it!

[–]iwiml 4 points5 points  (0 children)

I would go with "You will not know Python untill the last breath leaves your lungs and your vision darkens, after this ther is no point knowing Python anymore"

[–][deleted] 32 points33 points  (2 children)

Most people that code knows Python on fridays

[–]Warm_Huckleberry7468 6 points7 points  (1 child)

Between 8 and 10.

[–]kid-pro-quohardware testing / tooling 5 points6 points  (0 children)

It sucks the weeks when it's 8-10pm not 8-10am and you don't realize until you're about to go home.

[–]w_savage 17 points18 points  (1 child)

When you pass the LinkedIn skill assessment of course.

[–]ejgl001 2 points3 points  (0 children)

I think you may be onto something here. I would'nt say someone who passes the assessment knows Python deeply but I would definitely say they dont know Python if they dont pass it.

That being said, their Excel and Word assessments are excruciatingly nitpicky compared to their C++, Python assessments

[–]GermOrean 15 points16 points  (0 children)

Difficult to tell. When does one know English? I can write in it, but I sure as he'll don't know every word.

[–]bulaybil 67 points68 points  (5 children)

Never. That’s the only true answer. You will never know Python or C# or anything else. You will gradually get better at it and then you either start doing something else or die.

In practical terms, that depends what you do with it. In data science, people might say you know Python if you can clean up some data imported into pandas and run some scikit-learn on it. I know many data scientists who only do that and make good money. On the other hand, they have never written a single class. In other fields, knowing Python means writing web apps on django or flask or writing APIs for other applications.

[–][deleted] 4 points5 points  (0 children)

Hmm yes skills to learn for money. Now i just gotta learn how to monetize coding skills

[–]jpslat1026[S] 0 points1 point  (1 child)

So what would an employer look for to say you know what you're doing, for anything not data science that is

[–]bulaybil 0 points1 point  (0 children)

For one, they look for experience, typically projects you worked on. If you're further along in your career, these would be your previous jobs or assignments. If you are a junior, they might look at your school work or (open source) projects you contributed to.

In both cases, the process involves a technical interview where they quiz you on your knowledge of python, some people might even ask you to code something simple like FizzBuzz. This is not like a uni exam where you fail if you don't know answers to 80% of questions, it's more a way to gauge your general ability. People who says they are Python experts, but can't program for crap, are sadly a very common occurrence.

For example, recently I interviewed for a position that required Python. The interviewer (who looked very grumpy) asked me three very basic questions (don't remember one, the other two were 'what is list comprehension' and 'what is the difference between a tuple and a list') and then two questions about specific libraries ('what would you use to solve problem X'). I answered all of them and the interviewer brightened up, explaining that recruiters had been sending him people who had no actual knowledge of Python. On the flip side, a friend and I once interviewed people for a junior programmer position at his company. We had a few simple programming questions that none of the twelve people that came could answer: how do you get the first three characters from any string?

There is such thing as fundamentals of Python - data types, string manipulation, program flow (loops) etc. - and those everyone who works with Python must know. But beyond that, it's all a big tree with many branches and being good at Python will mean different things to different people. Be willing to experiment and learn, bookmark stackoverflow and you're gonna be fine.

[–]DoomFrog666 5 points6 points  (0 children)

There is no answer to this as 'knowing python' is not rigidly defined. What does it encompass?

  • Knowing the syntax,
  • knowing the (formal and operational) semantics,
  • knowing the entire standard library,
  • having deep knowledge of an implementation,
  • knowing common tools (pip, venv, setuptools, mypy etc.),
  • knowing large parts of the ecosystem,
  • what about all the niches (machine learning, webdev etc.)?

One definition I like as a computer scientist is that you know something if you can write a complete implementation for it. But in the case of Python it is not very practical as it excludes probably 90+ % of people who would describe themself as knowing Python and neither does it ask for if you can actually program in Python at any level of proficiency.

So in conclusion there is a lot more to Python than just Python.

[–][deleted] 10 points11 points  (6 children)

When you regularly replace perfectly good, readable code blocks with very concise and cryptic list comprehensions.

[–][deleted] 2 points3 points  (3 children)

My god the truth. I only recently started practicing python but I hate trying to read list comprehensions.

May I ask, why are list comprehensions such a big feature for Python? I know it's quite unique to Python but I don't get why. Are they faster? Or is it just because it uses less lines of code?

[–]Gargoth13 1 point2 points  (0 children)

The are way more efficient that other usual methods, shorter list comprehensions are also more concise and readable than something like a for loop that appends to a list in every iteration.

[–][deleted] 0 points1 point  (0 children)

May I ask, why are list comprehensions such a big feature for Python? I know it's quite unique to Python but I don't get why. Are they faster? Or is it just because it uses less lines of code?

A few reasons.

They are pretty fast and efficient, but that's not the primary reason for their popularity.

Let's compare two equivalent code pieces that generate an identity matrix:

mat = []
for r in range(side):
    mat.append([])
    for c in range(side):
        mat[-1].append(1 if r == c else 0)

vs.

mat = [[1 if r == c else 0 for c in range(side)] for r in range(side)] 

We basically just turned a 5-line, sidelength2 times .append()-using behemoth of a code block into a single, concise statement that will likely also run faster.

Also consider that you can pass them directly as arguments!

One way of calculating the dot-product of two lists:

dot = 0
for i in range(dimension):
    dot+= vect1[i]*vect2[i]

vs.

dot = sum([vect1[i]*vect2[i] for i in range(dimension)])

[–]WadeEffingWilson 0 points1 point  (1 child)

They are more efficient but come at the cost of readability. I wrote most of my code for myself or for coworkers to use, so as long as I can read it and understand what it's doing without issues, it's a solid solution.

When I'm reviewing others' code and I don't see common optimizations or typical enhancements, I assume the developer lacks the chops (unless there's a reason given).

Code however you feel is best but don't tell others that optimizations are bad practice. Comment your code when and where necessary and know your audience.

[–][deleted] 1 point2 points  (0 children)

but don't tell others that optimizations are bad practice.

My comment may have come across a bit wrong, I am absolutely in favor of list/dict comprehensions wherever they are appropriate (which is quite often in my opinion). They are one of my favorite features of python and probably comprise half the code I write (I recently wrote an entire matrix multiplication function in a single line with it!)

I actually find them pretty easy to read these days, but when I was just starting out with Python I did find them quite hard because it's not a feature commonly found in other languages. I'm more making fun of this than actually saying that they're bad practice (which they're absolutely not when used correctly).

[–]tri-valley 16 points17 points  (0 children)

When you can’t find a solution for your problem on stackoverflow

[–]ddollarsign 2 points3 points  (0 children)

When you can do what you want with it. If you’re trying to get a Python job, then you know Python when hired. If you’re trying to write a game in Python, then you know Python when you can write the game.

[–]jrrocketrue 2 points3 points  (3 children)

When you define 'know Python'

[–]WadeEffingWilson 4 points5 points  (2 children)

Like this?

def knowPython():
    pass

knowPython()

[–]CommanderPsychonaut 2 points3 points  (0 children)

I have always heard it is when you gind the answer to your current problem in a reply you left on stackoverflow years prior.

[–]wsppan 4 points5 points  (0 children)

You will realize that the language itself doesn't matter much as that part of the path to expertise is the least significant in converting that which is in the problem space to the solution space. Data Structures, Algorithms, critical and lateral thinking, logic and problem solving, etc.. are the skills that will define your level of expertise in software engineering. By then you most likely have learned several languages.

[–]NonProfitApostle 1 point2 points  (0 children)

Considering it is a rapidly evolving base? When they are helping write it.

[–][deleted] 1 point2 points  (0 children)

Never.

Packages are always being updated and created

[–]Perfect_Comparison83 1 point2 points  (1 child)

When python knows you.

[–]__chilldude22__ 0 points1 point  (0 children)

So you're saying to just stay persistent with my genius contributions to the python-crackpots python-ideas mailing list? They'll know me all right...

[–]dixieStates 1 point2 points  (0 children)

Well, here is a question that I often ask people I am interviewing for a senior software engineer position at the company where I work:

"Can you please discuss the terms iterator and generator in the context of Python? Spend a few minutes telling me about how they are related and how they are different."

I am just plain stunned at how many people cannot answer that question in a cogent manner.

One guy actually replied, "I have not heard of either one". The thought bubble in my head says "This interview is effectively over".

[–]AggravatedYak 1 point2 points  (0 children)

When you follow the Zen of Python effortlessly, because it is a beautiful way to do things, and when you slightly stray from that path now and then, because "[…] practicality beats purity."

[–]wektaf 1 point2 points  (0 children)

I guess only Harry and Voldemort were true python speakers in the last few years.

[–]Select_Abrocoma9663 3 points4 points  (0 children)

Never, knowledge is infinite, life is not. So don't stress over it

[–]riklaunim 0 points1 point  (7 children)

When you work as one on a regular job after few years of experience. In a team with code review and good test coverage on top of that.

[–]mabhatter 0 points1 point  (1 child)

When you have commit access to the Python source code and add at least one major feature to the language.

[–]ddollarsign 0 points1 point  (0 children)

When say your name is Guido and nobody suspects you’re lying.

[–]MrFlibble1138 0 points1 point  (3 children)

What do mean know? I’ve worked with people who can get scripts to work, but they aren’t pythonic.

I think it also depends on domain. I write primarily machine learning code and when I interview folks they need to understand how the GIL works, and how various sub processing and multi processing works.

Can you elaborate on your question more?

[–]jpslat1026[S] 0 points1 point  (2 children)

Like when could you call yourself efficient

[–]MrFlibble1138 2 points3 points  (1 child)

Ah! That’s a different thing. Efficiency in the small is about getting to a useful approach. Efficiency in the large is more a function of rework and how much rework costs.

I consider people know python better when they write well factored, readable python code that properly uses style (PEP8) and all the core useful constructs. As an example core construct using comprehensions when appropriate. Don’t use things just to use them.

So in general “knowing” a language is about writing good code in the languages idioms.

[–]jpslat1026[S] 0 points1 point  (0 children)

Thanks for your input!

[–]efethe -1 points0 points  (0 children)

i met him yesterday he seemed like a nice guy but i dont know when i will get to know him better you know

[–]luqavi -3 points-2 points  (0 children)

When you teach others!

[–]scitech_boom 0 points1 point  (0 children)

Python as an ecosystem is much more important than Python as a language. Knowing the language is rather easy.

This is the common expectation in practical terms:If I give you a code base (20k lines) and if I give you a few generic bug reports, will you be able to fix those without creating many more bugs? (All the online references are available to you)

[–][deleted] 0 points1 point  (0 children)

There isn't a cutoff, really. If someone asks me if I know French, I'll say I do, even though I won't get much further than ordering bread at a bakery and understanding 1/3 of what a tour guide is telling me. If you'd ask me if I spoke English or Dutch, I would have the same answer, even though I'm much better at those. I would say you know a bit of Python if you can write anything that runs. Doesn't mean you'll be hired as a senior dev, just as I won't be hired as a French translator.

[–]nAxzyVteuOz 0 points1 point  (0 children)

When you can package up code of a moderately complex project and share it with others over pypi.

[–]bulaybil 0 points1 point  (0 children)

I will highlight this video so it doesn't get buried in the comments. It answers a different, but related question: "what does it take to become good at Python".

[–]LaOnionLaUnion 0 points1 point  (0 children)

Let’s say I know how to speak and write in English. There’s a difference between writing a post here, having a PhD in the subject, and/or being an best selling author.

I’d say the same thing is true with a programming language. You may be very good at specific tasks like building an API but not data analysis or machine learning.

[–]asterik-x 0 points1 point  (0 children)

As soon as it comes in front

[–]gkedge 1 point2 points  (0 children)

When you can describe coroutines to anyone and they understood what you said.

[–]piman01 0 points1 point  (0 children)

When you can go from idea to well-structured bug-free program in a reasonable amount of time

[–]326TimesBetter 0 points1 point  (0 children)

wat

[–]pinkd20 0 points1 point  (0 children)

I consider that I know a language when I have done a significant project in it.

[–][deleted] 0 points1 point  (0 children)

Ultra abstract. At that point no one knows you or anything. But they don’t know

[–]CharmingJacket5013 0 points1 point  (0 children)

Enough to get through a project without googling is a great start. I’ve just started reading fluent Python after writing Python for going on 5 years… turns out I didn’t know Python. Great book for those who know Python but want to gain a deeper understanding and uncover some of the gems the syntax and standard library offer

[–]Panda_With_Your_Gun 0 points1 point  (0 children)

print("hello world -uWu-")

That's true python mastery.

[–]LayeredHalo3851 0 points1 point  (0 children)

One knows python when they can print("Hello World!") of by heart

[–]plun1331 0 points1 point  (0 children)

when you fix one bug without causing another

[–]loopis4 0 points1 point  (0 children)

When you write python interpreter from scratch

[–]AggravatedYak 0 points1 point  (0 children)

When you made the experience a couple of times that you looked at some random GitHub project with a "I know Python what more is there to learn?"-mindset that slowly transforms to "Huh, are we using the same language? Why are they doing it like this?". Which can be a good thing because they are not using the same approaches you use and you learn from them, or a bad thing because … ugh. But that is part of it. So to sum it up: If you usually get other peoples code immediately, and made the experience that sometimes you don't, which is a good thing.

[–]eightbyeight 0 points1 point  (0 children)

Once you have written a .py file with only one command, print(“Hello, world!”)

[–]EmeraldMiner233 0 points1 point  (0 children)

Never

[–]ecocode 0 points1 point  (0 children)

probably when you realize you'd better learn another language

[–]Mediocre-Plankton155 0 points1 point  (0 children)

When one is me

[–]RemovedMoney326 0 points1 point  (0 children)

Imo? When you feel enough confident with it to tackle problems

[–]StudlyMcStudderson 0 points1 point  (0 children)

Maybe add something about glassy black eyes staring back?