@WayneWerner Woah! I've just posted on a meta question along these lines. Will this be badly taken? Seems a shame for documenting an interpreted language without prompts...
This would apply beyond python I would think... pretty much any interpreted language with a prompt, should look up what's going on with R documentation. Someone suggested I make that a topic in the documentation group.
there is a meta Documentation Topic on formatting within documentation (and Python) but it basically comes down to - we've all learned to hate it or, at minimum, be annoyed by it and so ignore it
granted, I think this room's biggest complaint is the "examples" angle makes no sense to us (tutorials or actual documentation would but posted homework answers...err..examples not as much)
we deleted it (actually a massive amount of examples were created then deleted one by one until the whole mess was just deleted)....let me find last version
^ check through the edit history (view topic) and you'll see the amount of deleting and creating going on (this is the most complete version that turned into nobody being able to agree on whether code should be directly copy and paste-able)
:( That seems such a waste to me. The variation on examples in the documentation at the moment are going to a persist because it's confusing as is. I can't imagine this debate didn't rage back in deciding on Docstring years ago, but a decision was made and adhered to (at least somewhat) in documentation style and the standard command prompt. Seems a shame to drop that with the opportunity of doing more (useful) documentation.
But I realize I'm jumping in to a debate that's already raged.
yes, cause I've written documentation before (and guidelines, standard operation procedures, emergency procedures, specification, etc) and that is a terrible answer but I'm to the point that I just don't care
if its all about examples it is too broken to be fixed
Reminds me of debates re: python/perl :P (Shout out for readability!) I think formatting for interpreted language examples in general could do with a standard for prompts across the board here if Stackoverflow is aiming to help with documentation.
let's say i have a .txt or .csv file containing integers 1 2 3. so "1 2 3". is there a way to read in whichever file is available with a single command? or do i need an if/else statement -> if "file.txt" exists, read in else if file.csv exists read in
which SOD or multi-datatype matrices? The latter is just a typical indicator that it is time to use pandas so not too frustrating - SOD is a different matter
Also, you could open both but better bet would be to try and open the first and if it causes an exception - catch that and then open the other (with another try which logs and raises an exception if that one doesn't exist either)
lol @idjaw - gotta love it when OP takes "duplicate" to mean "exact duplicate down to the wording and grammar"
I think it is worse for those of us who work in areas where documentation could have been good (like Flask according to some experts) or where it might have helped reduce the broad, bad questions (like NLP/NLTK stuff)
security clearance was such a cool mechanic - also it was fun to get Ultra first and have the "Remove all other players" sub-task (instant win anyone?)
In my in box, I got a suggested edit for an old answer I gave. I've restored the original content, but it's apparent that the editor relatively new.
My question and concern is that I have no way to inform this editor and those that approved that created errors in my post. I can see there is a re...
I need a good explanation (references are a plus) on Python's slice notation.
To me, this notation needs a bit of picking up.
It looks extremely powerful, but I haven't quite got my head around it.
The answers above don't discuss slice assignment:
>>> r=[1,2,3,4]
>>> r[1:1]
[]
>>> r[1:1]=[9,8]
>>> r
[1, 9, 8, 2, 3, 4]
>>> r[1:1]=['blah']
>>> r
[1, 'blah', 9, 8, 2, 3, 4]
This may also clarify the difference between slicing and indexing.
TIL It’s possible to run the Python installer on Windows and not select anything to install, so the installer will run through and everything but nothing is being installed
But I wrote an answer to essentially the same question 6 months earlier. Should I hammer the Jun 26 '15 question to the one I answered on Jan 14 '15? Or should I just link them via a comment?
When a company is national-centric and does not care about the rest of the world, it is often not a good sign of the quality of the products , that company is trading... I guess it is very empirical and based on my personal sample but often it turned out to be true
@Bio Generally speaking, it's a really good idea to have a solid foundation of core Python (and the principal standard libraries that ship with Python) before you attempt to master a complex 3rd party library. Having those core skills will make it a lot easier to understand the docs for the 3rd party library, since the writers of those docs will assume you have those skills. And having that solid foundation will make it easier to understand how best to use the features of that library.
@shahidkhan the problem with stuff like djangogirls is it feels as though it's designed for someone with ADHD, who will lose focus very quickly if not given very quick visible results back
(Apologies for anyone with ADHD here, especially if it's not actually like that. I hope you see the point I'm trying to make.)
I'm exaggerating a bit, but yeah. TBH I'm a bit like that as well, so I also learned slower than I could've, but the more Python you understand up front the shorter your entire journey will be
Having said that, if you get bored and give up because you never saw any results then that also wasn't great
I totally understand people wanting to do interesting stuff when they first start programming, and you can do some pretty impressive stuff in Python, even just using the standard modules, without having a solid mastery of the core language. OTOH, there's no substitute for that core language knowledge, and acquiring an understanding of what programming's all about. Without that foundation you're doomed to become a cargo-culter.
Yes, it can be boring writing CLI stuff that does simple processing of ints, strings and other basic objects. But hey, if you can't cope with doing boring stuff from time to time perhaps programming is not for you.
In fact - I thoroughly enjoy the boring bits - data and backend stuff... although I have to do the front-end stuff to show that something's actually happened... clients tend to panic a bit when they're paying you and you've got the DB set up, the websocket server going, you've got the automated processes and the failovers set up etc... etc... there's always that "but what can I look at!?" :p
Some people are great at working on individual bits and pieces, but aren't great when it comes to integrating everything. Others are excellent at coming up with a holistic framework for the whole project, but aren't so skilled at doing the fine detailed stuff. So it's kinda essential that the different types can appreciate each others' values, and can communicate and work together effectively.
@PM2Ring And generally the people you want to design the most fabulous interior/exterior aren't the same people you want designing and building your most fuel efficient powerful engine :)
Thankfully - most of the front-end stuff I have to do is for internal tooling - so bootstrap with material design and re-using templates I've already got is more than enough... for a consumer facing website - I'd get someone else to do it...
@NinjaPuppy Exactly! Some people can do both types of work, but it's rare that they can do both of them well. :) True, plenty of good software was created by a sole coder, but the vast majority of those programs are old CLI utilities. On a modern GUI project, especially if it's sufficiently big that it's just not practical for one person to do everything, it makes sense to use a "divide and conquer" strategy.
> Best part is Apple forcing the hand of the wireless industry and us getting wired quality wireless earphones within a couple of years and we can finally say goodbye to shitty tangled wires.
advance the humanity as much as you want but don't get rid of industry standard headphone jack. Not like it's only the headphones that have that 3.5mm connector
especially if the only reason for doing so is to get your phone .5 mm thinner
this is a big issue. Many people have privacy concerns with WIndows 10. Microsoft's policies of forcing its users to adopt their new mall-ware is a big concern.
If I had paid for Windows 7/8 I would be really furious.