I am new to Python. Trying to pick up Airflow. What is context or **context in Airflow that is used in methods? For example mentioned by the answer in this question     Or like in    def execute(self, context):   def is_business_account(**context):   Appreciate your help!
866
In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):
65261
What are some real world places that call for delegates?  I'm curious what situations or patterns are present where this method is the best solution.  No code required.
2930
How can I detect and/or change the active tab in the current editor via Python?   Is this doable? I have been digging through bpy.context.region/screen and not yet found a way to list the active tab.
28385
There seem to be many ways to define  in Python. Is there a consensus opinion on Stack&nbsp;Overflow?
19683
I got this error message when I try to enable my addon.  dataBrush = bpy.context.blend_data.brushes  AttributeError:'_RestrictContext' object has no attribute 'blend_data'   Please some help    I am working on an dynamic palette for sculpt brushes
41125
I have been looking at the plugin API a bit more in depth recently and I was wondering what real differences there were between action and filter hooks. They both are events that receive data as a parameter and they seem to both be able to do the same things.  Obviously I see that actions are called when actions take place and filters are called when data is manipulated, but it seems to just be a semantic naming difference.  Besides semantics and what they are used for, what real differences are there between them?
110498
That's it. If you want to document a function or a class, you put a string just after the definition. For instance:  def foo():     """This function does nothing."""     pass   But what about a module? How can I document what a file.py does?
112923
Can someone help me understand what the last 2 lines of this code does:  import arcpy arcpy.env.workspace = "c:/esripress/python/data/exercise07" arcpy.env.overwriteOutput = True  copy = arcpy.CopyFeatures_management("airports.shp","Results/airports.shp") fc = "Results/airports.shp"  cursor = arcpy.da.UpdateCursor(fc, ["STATE"], ' "STATE" &lt;&gt; \'AK\'') for row in cursor:     row[0] = "AK"     cursor.updateRow(row) del row del cursor   I understand that the loop function goes through each record that does not have a value of 'AK'  and gives that record a value of "AK".  But what I don't understand is what the del row and del cursor are meant to do.
13804
I hope this qualifies as a programming question, as in any programming tutorial, you eventually come across 'foo' in the code examples. (yeah, right?)  what does 'foo' really mean?  If it is meant to mean nothing, when did it begin to be used so?
52016
Given a Python object of any kind, is there an easy way to get the list of all methods that this object has?  Or,  if this is not possible, is there at least an easy way to check if it has a particular method other than simply checking if an error occurs when the method is called?
4613
How can I create or use a global variable in a function?  If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable in a local variable of the function which needs its access?
108454
I try to do this:  bpy.ops.object.select_all() bpy.ops.object.join()   in my script. It selects all the stuff like CtrlA but fails on join() (CtrlJ) with the following error message:     Traceback (most recent call last):   File "", line 1,   in    File "C:\Program Files\Blender   Foundation\Blender\2.71\scripts\modules\bpy\ops.py", line 188, in   __ call __       ret = op_call(self.idname_py(), None, kw) RuntimeError: Operator bpy.ops.object.join.poll() failed, context is incorrect   the message is from console.  How can I make this work? CtrlA, CtrlJ actually works.
85534
On meta, I've found the disscussion , but it doesn't answer my question.  When should I use the environment quote? When quotation?
83035
The place is important for/to me.   I changed the variable for/to the project.   I can do to/for you.   In/for/to this project, I created a new method.      Does it mean any difference?  This bothered me many times.  Wish someone can answer.
51358
How do you decide between passing arguments to a method versus simply declaring them as object instance variables that are visible to all of the object's methods? I prefer keeping instance variables in a list at the end of the Class, but this list gets longer as my program grows. I figure if a variable is passed often enough it should just be visible to all methods that need it, but then I wonder, &quot;if everything is public there will be no need for passing anything at all!&quot;
1251
The python program command executes Python 2. Python 3 can be executed using the python3 command.  How can Python 3 be executed using the python command?
11950
If you are writing a program that is executable from the command line, you often want to offer the user several options or flags, along with possibly more than one argument. I have stumbled my way through this many times, but is there some sort of design pattern for looping through args and calling the appropriate handler functions?  Consider:  myprogram -f filename -d directory -r regex   How do you organize the handler functions after you retrieve the arguments using whatever built-ins for your language? (language-specific answers welcomed, if that helps you articulate an answer)